diff --git a/hyprsolusctl b/hyprsolusctl index 989a85f..e57c4ac 100644 --- a/hyprsolusctl +++ b/hyprsolusctl @@ -59,7 +59,7 @@ info () { --local) shift ; release=0 ;; --json) shift ; json=0 ;; --) shift ; glow_args="$*" ; break ;; - *) echo "$1" + *) echo "Ignoring argument $1" ;; esac done @@ -83,8 +83,16 @@ info () { } update () { - cd "$HYPRSOLUS_PATH" + while test $# -ne 0 + do + case $1 in + --ensure-deps-latest) shift ; deps_update=0 ;; + *) echo "Ignoring argument $1" ;; + esac + done + deps_update=${deps_update:-1} + cd "$HYPRSOLUS_PATH" # Fetch new content from remote git fetch --all git pull origin main @@ -95,7 +103,10 @@ update () { systemctl --user daemon-reload echo "(hyprsolus) Updating the dependencies if needed." - sudo sh "${HYPRSOLUS_PATH}/requirements.sh" + if [[ $deps_update -eq 0 ]] + then + sudo sh "${HYPRSOLUS_PATH}/requirements.sh" + fi } @@ -104,6 +115,8 @@ upgrade () { do case $1 in --ensure-integrity) shift ; eopkg_check=0 ;; + --ensure-deps-latest) shift ; deps_update=0 ;; + *) echo "Ignoring argument $1" ;; esac done @@ -129,7 +142,7 @@ upgrade () { case $1 in check) check ;; - update) update ;; + update) shift ; update "$@" ;; upgrade) shift ; upgrade "$@" ;; info) shift ; info "$@" ;; *) exit 1 ;;