diff options
author | Erich Eckner <git@eckner.net> | 2016-04-25 08:30:50 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2016-04-25 08:30:50 +0200 |
commit | aa2e95c25ee656800a31df90794a7bc1349c11c6 (patch) | |
tree | b21b7c47d412bc088b46505de92baf2ef4394c3e | |
parent | 28dbcc2d2af23d6ca838dfca9a2cf98088420521 (diff) | |
download | archlinuxewe-aa2e95c25ee656800a31df90794a7bc1349c11c6.tar.xz |
archPackagesUpdate kann jetzt speziellen Branch auschecken
-rwxr-xr-x | archPackagesUpdate | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/archPackagesUpdate b/archPackagesUpdate index fb036a224..a70fa95df 100755 --- a/archPackagesUpdate +++ b/archPackagesUpdate @@ -9,6 +9,7 @@ pkgSrcDir="$(dirname $(readlink -f -n "$0"))" [ "${pkgSrcDir}" == "${HOME}" ] && \ aufRechenknecht=true || \ aufRechenknecht=false +branch="HEAD" force=false upload=true updateMe=true @@ -28,6 +29,8 @@ usage() >&2 echo 'Skript zum Updaten der selbsterstellten Archlinux-Pakete' >&2 echo '' >&2 echo 'Optionen:' + >&2 echo ' -b|--branch [commitish]:' + >&2 echo ' branch to check out - defaults to "HEAD"' >&2 echo ' --cleanCache:' >&2 echo ' clean up pacman cache in build environments' >&2 echo ' -c|--cleanUnsigned:' @@ -80,7 +83,8 @@ cleanUp () { echo 'parse arguments ...' eval set -- "$( - getopt -o cfL::r \ + getopt -o b:cfL::r \ + --long branch: \ --long cleanCache \ --long cleanUnsigned \ --long force \ @@ -101,6 +105,11 @@ args=("$@") while true do case $1 in + -b|--branch) + shift + branch="$1" + echo '"branch '"${branch}"'" erkannt' + ;; --cleanCache) echo '"cleanCache" erkannt' cleanCache=true @@ -171,8 +180,8 @@ echo '... done' $aufRechenknecht && pkgSrcDir="${pkgSrcDir}/archPackages" cd "${pkgSrcDir}" -# extract git HEAD -git archive --format tar HEAD | \ +# extract git ${branch} +git archive --format tar "${branch}" | \ tar -x -C "${tmpDir}" -f - cd "${tmpDir}" |