summaryrefslogtreecommitdiff
path: root/fullpkg-ng
diff options
context:
space:
mode:
authorJoshua Ismael Haase Hernandez <hahj87@gmail.com>2011-05-30 11:28:28 -0500
committerJoshua Ismael Haase Hernandez <hahj87@gmail.com>2011-05-30 11:28:28 -0500
commitf0d14d7c815e5b7a17ca190c13f0abe386d41c08 (patch)
tree64617e88460997ce36b68432f933f60f8d2cd4b2 /fullpkg-ng
parentfee39ffbf93219be50ab0a522b94d71be9d54dbb (diff)
Traps when needen on fullpkg-ng
Diffstat (limited to 'fullpkg-ng')
-rwxr-xr-xfullpkg-ng12
1 files changed, 8 insertions, 4 deletions
diff --git a/fullpkg-ng b/fullpkg-ng
index 877e21f..ee503ec 100755
--- a/fullpkg-ng
+++ b/fullpkg-ng
@@ -177,10 +177,6 @@ function find_deps {
function _pkg_build () {
pushd ${build_dir} > /dev/null
- # Exit loop on Ctrl+C
- trap "break" INT
- # Remove from queue package being built on error
- trap "remove_queue" EXIT INT QUIT TERM KILL
build_packages=$(sort -gr $buildorder | cut -d: -f2)
while [ ${#build_packages[@]} -ge 1 ]; do
build_packages=$(sort -gr $buildorder | cut -d: -f2)
@@ -301,6 +297,10 @@ done
}
# Build only
[ $build_only == 'y' ] && {
+ # Exit loop on Ctrl+C
+ trap "break" INT
+ # Remove from queue package being built on error
+ trap "remove_queue" EXIT INT QUIT TERM KILL
_pkg_build
exit 0
}
@@ -352,6 +352,10 @@ find_deps || {
msg "Building packages:"
[ ! -w $queue_file ] && error "can't write queue file"
+# Exit loop on Ctrl+C
+trap "break" INT
+# Remove from queue package being built on error
+trap "remove_queue" EXIT INT QUIT TERM KILL
_pkg_build
echo