Skip to content

Commit

Permalink
Add custom changes functionality to update.bash
Browse files Browse the repository at this point in the history
Signed-off-by: Ethan Dye <[email protected]>
  • Loading branch information
ecdye committed May 27, 2024
1 parent e63835c commit 9203766
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ Note that this sync service is not installed by default, you must install it sep
sudo /path/to/zram-config/update.bash
```

To make changes to the code or checkout a specific branch/tag and prevent it from updating/resetting all changes run the following instead.

``` shell
sudo /path/to/zram-config/update.bash custom
```

### Uninstall

``` shell
Expand Down
12 changes: 7 additions & 5 deletions update.bash
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ if [[ $OS == "ubuntu" ]] && [[ $(bc -l <<< "$(grep -o '^VERSION_ID=.*$' /etc/os-
fi
fi
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
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
fi
make --always-make --directory="${BASEDIR}/overlayfs-tools"
Expand Down

0 comments on commit 9203766

Please sign in to comment.