Skip to content

Commit

Permalink
use sudo for CD command
Browse files Browse the repository at this point in the history
  • Loading branch information
hughjfchen committed May 10, 2022
1 parent eea2ba6 commit 03d3767
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 03d3767

Please sign in to comment.