summaryrefslogtreecommitdiffstats
path: root/ch
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2016-08-26 19:12:57 +0200
committerFlorian Pritz <bluewind@xinu.at>2016-08-26 19:12:57 +0200
commitf1dbb24d1b93adb9b76f1bfed2c619a4e71c447b (patch)
treef2581222b471786346ded818fc5da7498681c78f /ch
parent138ce90bd5c87b10d35ab3b07629a9957d7fc59c (diff)
downloadbin-f1dbb24d1b93adb9b76f1bfed2c619a4e71c447b.tar.gz
bin-f1dbb24d1b93adb9b76f1bfed2c619a4e71c447b.tar.xz
ch: Fix shellcheck warnings
Signed-off-by: Florian Pritz <bluewind@xinu.at>
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";;