Skip to content

Commit e295b20

Browse files
committedAug 15, 2020
Fix shellcheck errors
1 parent c0e155b commit e295b20

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed
 

‎entrypoint.sh

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh -l
1+
#!/bin/bash
22

33
# fail whole script if any command fails
44
set -e
@@ -27,20 +27,20 @@ if [[ ! -e $pkgname/PKGBUILD ]]; then
2727
exit 1
2828
fi
2929

30-
pkgbuild_dir=$(readlink $pkgname -f) # nicely cleans up path, ie. ///dsq/dqsdsq/my-package//// -> /dsq/dqsdsq/my-package
30+
pkgbuild_dir=$(readlink "$pkgname" -f) # nicely cleans up path, ie. ///dsq/dqsdsq/my-package//// -> /dsq/dqsdsq/my-package
3131

3232
getfacl -p -R "$pkgbuild_dir" /github/home > /tmp/arch-pkgbuild-builder-permissions.bak
3333

3434
# '/github/workspace' is mounted as a volume and has owner set to root
3535
# set the owner of $pkgbuild_dir to the 'build' user, so it can access package files.
36-
sudo chown -R build $pkgbuild_dir
36+
sudo chown -R build "$pkgbuild_dir"
3737

3838
# needs permissions so '/github/home/.config/yay' is accessible by yay
3939
sudo chown -R build /github/home
4040

41-
cd $pkgbuild_dir
41+
cd "$pkgbuild_dir"
4242

43-
pkgname="$(basename $pkgbuild_dir)" # keep quotes in case someone passes in a directory path with whitespaces...
43+
pkgname="$(basename "$pkgbuild_dir")" # keep quotes in case someone passes in a directory path with whitespaces...
4444

4545
install_deps() {
4646
# install make and regular package dependencies
@@ -56,7 +56,10 @@ case $target in
5656
install_deps
5757
makepkg --syncdeps --noconfirm
5858
namcap "${pkgname}"-*
59+
60+
# shellcheck disable=SC1091
5961
source /etc/makepkg.conf # get PKGEXT
62+
6063
pacman -Qip "${pkgname}"-*"${PKGEXT}"
6164
pacman -Qlp "${pkgname}"-*"${PKGEXT}"
6265
;;

0 commit comments

Comments
 (0)