diff --git a/remote-check.sh b/remote-check.sh index bbdadee..43b387f 100644 --- a/remote-check.sh +++ b/remote-check.sh @@ -1,6 +1,8 @@ #!/bin/bash -# $1=git link $2 = local hash file $3 remote/file that contains the hash in the repo $4 output name -git ls-remote $1 HEAD > $2 +# $1=git link, $2=local hash file, $3=remote/file that contains the hash in the repo, $4=output name, $5(optional)=branch +BRANCH=${5:-HEAD} # Set BRANCH to $5 if provided, else default to HEAD + +git ls-remote $1 $BRANCH > $2 local="$2" remote="$3"