index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | archbuild.in | 9 |
diff --git a/archbuild.in b/archbuild.in index 60e7cec..8339aef 100644 --- a/archbuild.in +++ b/archbuild.in @@ -2,6 +2,7 @@ # License: Unspecified m4_include(lib/common.sh) +m4_include(lib/archroot.sh) base_packages=(base-devel) makechrootpkg_args=(-c -n) @@ -30,8 +31,6 @@ usage() { exit 1 } -orig_argv=("$@") - while getopts 'hcr:' arg; do case "${arg}" in c) clean_first=true ;; @@ -40,7 +39,7 @@ while getopts 'hcr:' arg; do esac done -check_root "$0" "${orig_argv[@]}" +check_root # Pass all arguments after -- right to makepkg makechrootpkg_args+=("${@:$OPTIND}") @@ -54,9 +53,7 @@ if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then lock 9 "$copy.lock" "Locking chroot copy '%s'" "$copy" - if [[ "$(stat -f -c %T "${copy}")" == btrfs ]]; then - { type -P btrfs && btrfs subvolume delete "${copy}"; } &>/dev/null - fi + subvolume_delete_recursive "${copy}" rm -rf --one-file-system "${copy}" done lock_close 9 |