This patch handles the detached HEAD case, by using git branch --contains HEAD to get the branch (or a list of possible branches).
It also adds a option to specify the branch in case this logic fails. Also there is an option to override the base source url for downloading.
While I was at it, I adjusted some checks so that the script will run even if the name of the checkout directory is not $packagename.
On 06/12/2014 07:12 PM, Mike McLean wrote:
This patch handles the detached HEAD case, by using git branch --contains HEAD to get the branch (or a list of possible branches).
It also adds a option to specify the branch in case this logic fails. Also there is an option to override the base source url for downloading.
While I was at it, I adjusted some checks so that the script will run even if the name of the checkout directory is not $packagename.
thanks, looks good and works for me
applied, pushed
On 2014-06-12 20:12, Mike McLean wrote:
+#parse command line args +BRANCH='' +while (($# > 0)) +do
- case $1 in
- --branch)
#specify branch instead of asking git
BRANCH=$2
shift 2
;;
- --surl)
#override sources url
surl=$2
shift 2
;;
- esac
+done
The expected result of
$ bash get_sources.sh --sulr ...
is what? (i.e. typo-ed opt should probably not cause endless looping.)
The --surl option is probably more of a debug option right now. It just changes the base url for downloading the lookaside sources. It might be useful if someone was mirroring the lookaside sources. I might use it to test staged content.
On Fri, Jun 13, 2014 at 4:42 AM, Elias Persson delreich@takeit.se wrote:
On 2014-06-12 20:12, Mike McLean wrote:
+#parse command line args +BRANCH='' +while (($# > 0)) +do
- case $1 in
- --branch)
#specify branch instead of asking git
BRANCH=$2
shift 2
;;
- --surl)
#override sources url
surl=$2
shift 2
;;
- esac
+done
The expected result of
$ bash get_sources.sh --sulr ...
is what? (i.e. typo-ed opt should probably not cause endless looping.)
CentOS-devel mailing list CentOS-devel@centos.org http://lists.centos.org/mailman/listinfo/centos-devel
Sorry I misread your explanation at first. Thanks for the fix. Looks good and works for me. Ack.
On Fri, Jun 13, 2014 at 4:42 AM, Elias Persson delreich@takeit.se wrote:
On 2014-06-12 20:12, Mike McLean wrote:
+#parse command line args +BRANCH='' +while (($# > 0)) +do
- case $1 in
- --branch)
#specify branch instead of asking git
BRANCH=$2
shift 2
;;
- --surl)
#override sources url
surl=$2
shift 2
;;
- esac
+done
The expected result of
$ bash get_sources.sh --sulr ...
is what? (i.e. typo-ed opt should probably not cause endless looping.)
CentOS-devel mailing list CentOS-devel@centos.org http://lists.centos.org/mailman/listinfo/centos-devel