Skip to content

Commit

Permalink
Update install/update routines
Browse files Browse the repository at this point in the history
Signed-off-by: Ethan Dye <[email protected]>
  • Loading branch information
ecdye committed Dec 19, 2024
1 parent 0b83593 commit 9e74aaa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion install.bash
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if [[ $1 == "sync" ]]; then
echo "##### zsync service is now installed #####"
exit 0
fi
if [[ "$(systemctl is-active zram-config.service 2> /dev/null)" == "active" ]] || rc-service zram-config status 2> /dev/null; then
if [[ $(systemctl is-active zram-config.service) == "active" ]] || rc-service zram-config status 2> /dev/null; then
echo -e "ERROR: zram-config service is still running.\\nPlease run \"sudo ${BASEDIR}/update.bash\" to update zram-config instead."
exit 1
fi
Expand Down
6 changes: 2 additions & 4 deletions update.bash
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if [[ "$(id -u)" -ne 0 ]]; then
echo "ERROR: You need to be ROOT (sudo can be used)."
exit 1
fi
if ! [[ -f /usr/local/sbin/zram-config || -f /usr/sbin/zram-config ]]; then
if ! [[ -s /usr/local/sbin/zram-config || -s /usr/sbin/zram-config ]]; then
echo -e "ERROR: zram-config is not installed.\\nPlease run \"sudo ${BASEDIR}/install.bash\" to install zram-config instead."
exit 1
fi
Expand All @@ -29,10 +29,8 @@ fi
if [[ $1 != "custom" ]]; then
git -C "$BASEDIR" fetch origin
git -C "$BASEDIR" fetch --tags --force --prune
git -C "$BASEDIR" clean --force -x -d
git -C "$BASEDIR" checkout main
git -C "$BASEDIR" reset --hard origin/main
git -C "$BASEDIR" reset --hard --recurse-submodules origin main
git -C "$BASEDIR" submodule update --init --recursive
fi
Expand Down

0 comments on commit 9e74aaa

Please sign in to comment.