From 03d3767136717d33736e8ab39a67d086c511abe5 Mon Sep 17 00:00:00 2001 From: hughjfchen Date: Tue, 10 May 2022 20:38:35 +0800 Subject: [PATCH] use sudo for CD command --- .../nixos2111-ghc8107-haskell.nix/cd/fix-up/do.sh | 2 +- .../nixos2111-ghc8107-haskell.nix/cd/unpack-tarball/do.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/project-scaffold-template/nixos2111-ghc8107-haskell.nix/cd/fix-up/do.sh b/project-scaffold-template/nixos2111-ghc8107-haskell.nix/cd/fix-up/do.sh index 98b6a46..80fec05 100755 --- a/project-scaffold-template/nixos2111-ghc8107-haskell.nix/cd/fix-up/do.sh +++ b/project-scaffold-template/nixos2111-ghc8107-haskell.nix/cd/fix-up/do.sh @@ -15,7 +15,7 @@ begin_banner "Top level" "project deploy - fix-up" if [ -n "$NIX_STORE_PATH" ]; then if [ -n "$RELEASE_HAS_SYSTEMD_SERVICE" ] && [ "true" == "$RELEASE_HAS_SYSTEMD_SERVICE" ]; then - "$NIX_STORE_PATH"/bin/setup-systemd-units + sudo "$NIX_STORE_PATH"/bin/setup-systemd-units else info "To use the program, type $NIX_STORE_PATH/bin/{{name}}-bin-sh at the command prompt." fi diff --git a/project-scaffold-template/nixos2111-ghc8107-haskell.nix/cd/unpack-tarball/do.sh b/project-scaffold-template/nixos2111-ghc8107-haskell.nix/cd/unpack-tarball/do.sh index 16eebfe..b2d98c9 100755 --- a/project-scaffold-template/nixos2111-ghc8107-haskell.nix/cd/unpack-tarball/do.sh +++ b/project-scaffold-template/nixos2111-ghc8107-haskell.nix/cd/unpack-tarball/do.sh @@ -15,9 +15,9 @@ begin_banner "Top level" "project deploy - unpacking" if [ -e "${SCRIPT_ABS_PATH}"/../../"$RELEASE_TARBALL_NAME".tar.gz ]; then if [ -n "$RELEASE_USER_NAME" ]; then - tar zPxf "$SCRIPT_ABS_PATH/../../$RELEASE_TARBALL_NAME.tar.gz" --owner "$RELEASE_USER_NAME" --group "$RELEASE_USER_NAME" + sudo tar zPxf "$SCRIPT_ABS_PATH/../../$RELEASE_TARBALL_NAME.tar.gz" --owner "$RELEASE_USER_NAME" --group "$RELEASE_USER_NAME" else - tar zPxf "$SCRIPT_ABS_PATH/../../$RELEASE_TARBALL_NAME.tar.gz" + sudo tar zPxf "$SCRIPT_ABS_PATH/../../$RELEASE_TARBALL_NAME.tar.gz" fi else my_exit "No ${SCRIPT_ABS_PATH}/../../$RELEASE_TARBALL_NAME.tar.gz found, can't unpack tarball" 127