diff options
author | davidovski <david@davidovski.xyz> | 2021-10-06 23:30:26 +0100 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2021-10-06 23:30:26 +0100 |
commit | 9a22337a23d6122e13323f3b9e51c4cf037cbf9f (patch) | |
tree | a54c067f41ee7cb71e14e235fea5dcb9af84cfe2 /xibuild | |
parent | 2939f4d1c36d784773f6ab642e83b48e413adbfc (diff) |
added features for branch switching
Diffstat (limited to 'xibuild')
-rwxr-xr-x | xibuild | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -57,6 +57,7 @@ xibuild () { echo "Passing missing package stage" } + BRANCH=HEAD source $BUILD_FILE @@ -88,7 +89,7 @@ xibuild () { # try get the commit hash for the package if git ls-remote -q $SOURCE &> /dev/null; then - VER_HASH=$(git ls-remote $SOURCE HEAD ) + VER_HASH=$(git ls-remote $SOURCE $BRANCH ) else VER_HASH=$(curl -Ls $SOURCE | md5sum) fi @@ -112,8 +113,9 @@ xibuild () { fi printf "$INFO\tfetching package..."; - if git ls-remote -q $SOURCE &> /dev/null; then + if git ls-remote -q $SOURCE $BRANCH &> /dev/null; then git clone $SOURCE . >> $LOGFILE 2>&1 && printf "$PASS fetched $(du -sh $PKG_BUILD_DIR | awk '{ print $1 }') source\n" || return 1; + git checkout $BRANCH >> $LOGFILE 2>&1 else DOWNLOADED=$(basename $SOURCE) curl -Ls $SOURCE > $DOWNLOADED @@ -221,4 +223,3 @@ if [ $# -gt 0 ]; then else usage; return 1 fi - |