From 85c4d75c01e3f73c961e59e0697e9e47456a9b5f Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Sat, 13 Mar 2021 17:34:59 -0500 Subject: [PATCH] FIX add error message when proper args are not supplied --- dot_bin/executable_bootstrap_pkgs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/dot_bin/executable_bootstrap_pkgs b/dot_bin/executable_bootstrap_pkgs index 55f8cc0..76d6ab5 100644 --- a/dot_bin/executable_bootstrap_pkgs +++ b/dot_bin/executable_bootstrap_pkgs @@ -35,7 +35,7 @@ mk_makepkg_dir() { echo "Creating temporary makepkg build directory at $PKGBUILD_dir" mkdir -p "$PKGBUILD_dir" echo "Populated with packages from $PKGSRC_dir" - # cp -r "$PKGSRC_dir"/* "$PKGBUILD_dir" + cp -r "$PKGSRC_dir"/* "$PKGBUILD_dir" chown -R nobody:nobody "$PKGBUILD_dir" } @@ -133,6 +133,11 @@ if [[ ! "$(id -u)" = "0" ]]; then exit 1 fi +if [ "$#" -ne 1 ]; then + echo "Must supply the location of custom packages as sole argument. Exiting" + exit 1 +fi + mk_nobody_perms try_nobody_update @@ -144,7 +149,4 @@ mk_makepkg_dir run_makepkg rm_makepkg_dir -echo "$PKGSRC_dir" -echo "$PKGBUILD_dir" - rm_nobody_perms