summaryrefslogtreecommitdiffstats
path: root/ch
diff options
context:
space:
mode:
Diffstat (limited to 'ch')
-rwxr-xr-xch14
1 files changed, 8 insertions, 6 deletions
diff --git a/ch b/ch
index 939087f..f620d0b 100755
--- a/ch
+++ b/ch
@@ -1,5 +1,7 @@
#!/bin/bash
+set -e
+
# ch build <id> ... build the current package for multiple chroots
# ch build-single <id> [<arguments]
# build the current package for one chroot and pass arguments to makechrootpkg
@@ -132,7 +134,7 @@ chbuild() {
}
chinstall() {
- __chrootalias_resolve_create $1 || return; shift
+ __chrootalias_resolve_create "$1" || return; shift
for file in "$@"; do
files+=(-I "$(readlink -f "$file")")
done
@@ -141,7 +143,7 @@ chinstall() {
}
chclean() {
- __chrootalias_resolve_create $1 || return
+ __chrootalias_resolve_create "$1" || return
for copy in $chrootdir/*/; do
if [[ $copy = */root/ ]]; then
continue
@@ -153,16 +155,16 @@ chclean() {
}
chrshell() {
- __chrootalias_resolve_create $1 || return
+ __chrootalias_resolve_create "$1" || return
sudo arch-nspawn "$chrootdir/root" "${2:-/bin/bash}" "${@:3}"
}
chupdate() {
- __chrootalias_resolve_create $1 || return
+ __chrootalias_resolve_create "$1" || return
echo ":: Updating $chroot"
sudo arch-nspawn "$chrootdir/root" pacman -Syu --noconfirm
echo ":: Cleaning up ..."
- chclean $1
+ chclean "$1"
}
command=$1; shift
@@ -219,7 +221,7 @@ case $command in
install) chinstall "$@";;
list)
for chrootdir in "$CHROOTS/"*/; do
- echo "$(basename "$chrootdir")"
+ basename "$chrootdir"
done
;;
*) printf "Unknown command %s\n" "$command";;