diff --git a/README.md b/README.md index 0394e09..ee221f2 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/update.bash b/update.bash index d0fad02..9ce4a76 100755 --- a/update.bash +++ b/update.bash @@ -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"