index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
author | Luke Shumaker <lukeshu@parabola.nu> | 2017-03-25 12:34:38 -0400 |
---|---|---|
committer | Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> | 2017-04-05 22:03:00 +0200 |
commit | 997bc1dc0db12ee5791bfb74f07c91ce10ed7cfd (patch) | |
tree | ce42333902e990055f4bde7750d32dc10f7b7a8f | |
parent | f73c1f172f93b734ec46e861ed1ba8fbb05e65cf (diff) |
-rw-r--r-- | archbuild.in | 2 | ||||
-rw-r--r-- | lib/common.sh | 8 | ||||
-rw-r--r-- | makechrootpkg.in | 2 |
diff --git a/archbuild.in b/archbuild.in index a78353c..4d1b351 100644 --- a/archbuild.in +++ b/archbuild.in @@ -55,7 +55,7 @@ if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then subvolume_delete_recursive "${copy}" rm -rf --one-file-system "${copy}" done - exec 9>&- + lock_close 9 rm -rf --one-file-system "${chroots}/${repo}-${arch}" mkdir -p "${chroots}/${repo}-${arch}" diff --git a/lib/common.sh b/lib/common.sh index 599be54..689772f 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -159,6 +159,14 @@ slock() { } ## +# usage : lock_close( $fd ) +## +lock_close() { + local fd=$1 + exec {fd}>&- +} + +## # usage: pkgver_equal( $pkgver1, $pkgver2 ) ## pkgver_equal() { diff --git a/makechrootpkg.in b/makechrootpkg.in index dc598f7..ad99334 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -108,7 +108,7 @@ create_chroot() { stat_done # Drop the read lock again - exec 8>&- + lock_close 8 fi # Update mtime |