diff options
author | Martchus <martchus@gmx.net> | 2017-08-22 00:30:17 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-08-25 10:15:31 +0200 |
commit | 6cf3f3eee2a0720e07f657200519449fd65c7525 (patch) | |
tree | e1104f90d978b35b321d91fcea579c42ec8467e0 /makechrootpkg.in | |
parent | 85eaf4707a9a846db28d6a005ffe3d2895d356e8 (diff) | |
download | devtools-6cf3f3eee2a0720e07f657200519449fd65c7525.tar.xz |
makechrootpkg: Prevent removing build dir when --noextract specified
Diffstat (limited to 'makechrootpkg.in')
-rw-r--r-- | makechrootpkg.in | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/makechrootpkg.in b/makechrootpkg.in index eb5a4ad..4908f3b 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -18,7 +18,7 @@ shopt -s nullglob init_variables() { default_makepkg_args=(--syncdeps --noconfirm --log --holdver --skipinteg) makepkg_args=("${default_makepkg_args[@]}") - repack=false + keepbuilddir=false update_first=false clean_first=false run_namcap=false @@ -178,17 +178,17 @@ install_packages() { return $ret } -# Usage: prepare_chroot $copydir $HOME $repack $run_namcap +# Usage: prepare_chroot $copydir $HOME $keepbuilddir $run_namcap # Globals: # - MAKEFLAGS # - PACKAGER prepare_chroot() { local copydir=$1 local USER_HOME=$2 - local repack=$3 + local keepbuilddir=$3 local run_namcap=$4 - $repack || rm -rf "$copydir/build" + $keepbuilddir || rm -rf "$copydir/build" local builduser_uid builduser_gid builduser_uid="${SUDO_UID:-$UID}" @@ -356,8 +356,8 @@ main() { # See if -R was passed to makepkg for arg in "${@:OPTIND}"; do case ${arg%%=*} in - -*R*|--repackage) - repack=true + -*R*|--repackage|--noextract) + keepbuilddir=true break 2 ;; esac @@ -405,7 +405,7 @@ main() { download_sources "$copydir" "$makepkg_user" - prepare_chroot "$copydir" "$USER_HOME" "$repack" + prepare_chroot "$copydir" "$USER_HOME" "$keepbuilddir" if arch-nspawn "$copydir" \ --bind="$PWD:/startdir" \ |