From 7d6309897f4a0c1922dd44bba3a62c0107e39662 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Wed, 13 Dec 2023 19:23:34 -0500 Subject: [PATCH] feat(update script): make func for every src --- common/pkgs/pam-fprint-grosshack/default.nix | 3 +-- updateSha.sh | 23 +++++++++++++++----- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/common/pkgs/pam-fprint-grosshack/default.nix b/common/pkgs/pam-fprint-grosshack/default.nix index cdc44ab..7f590b9 100644 --- a/common/pkgs/pam-fprint-grosshack/default.nix +++ b/common/pkgs/pam-fprint-grosshack/default.nix @@ -14,12 +14,11 @@ }: stdenv.mkDerivation rec { pname = "pam-fprint-grosshack"; - version = "v0.3.0"; src = fetchFromGitLab { owner = "mishakmak"; repo = pname; - rev = version; + rev = "45b42524fb5783e1e555067743d7e0f70d27888a"; sha256 = "sha256-obczZbf/oH4xGaVvp3y3ZyDdYhZnxlCWvL0irgEYIi0="; }; diff --git a/updateSha.sh b/updateSha.sh index c643e4b..3155ee7 100755 --- a/updateSha.sh +++ b/updateSha.sh @@ -21,13 +21,11 @@ parseFetchurl() { sed -i "s,sha256 = .*,sha256 = \"$HASH\";," "$FILE" } -# TODO -# https://github.com/dasJ/spotifywm -# -# https://github.com/tio/input-emulator -# https://gitlab.com/mishakmak/pam-fprint-grosshack -# https://gitlab.com/phoneybadger/pokemon-colorscripts +updateOverlays() { + FILE="/home/matt/.nix/common/overlays" + parseNurl "https://github.com/dasJ/spotifywm" "$FILE/spotifywm/spotifywm.nix" +} updateDracula() { FILE="/home/matt/.nix/common/overlays/dracula-theme" @@ -39,6 +37,13 @@ updateDracula() { parseFetchurl "https://github.com/aynp/dracula-wallpapers/blob/main/Art/4k/Waves%201.png?raw=true" "$FILE/wallpaper.nix" } +updateCustomPkgs() { + FILE="/home/matt/.nix/common/pkgs" + parseNurl "https://github.com/tio/input-emulator" "$FILE/input-emulator/default.nix" + parseNurl "https://gitlab.com/mishakmak/pam-fprint-grosshack" "$FILE/pam-fprint-grosshack/default.nix" + parseNurl "https://gitlab.com/phoneybadger/pokemon-colorscripts" "$FILE/pokemon-colorscripts/default.nix" +} + updateFFZ() { FILE="/home/matt/.nix/home/firefox/addons/default.nix" URL="https://cdn.frankerfacez.com/script/frankerfacez-4.0-an+fx.xpi" @@ -80,15 +85,21 @@ updateGSR() { ) } + doAll() { updateFFZ + updateCustomPkgs + updateOverlays updateDracula updateFirefoxAddons updateGSR } + [[ "$1" == "-a" || "$1" == "--all" ]] && doAll [[ "$1" == "-d" || "$1" == "--dracula" ]] && updateDracula +[[ "$1" == "-c" || "$1" == "--custom" ]] && updateCustomPkgs +[[ "$1" == "-o" || "$1" == "--overlays" ]] && updateOverlays [[ "$1" == "-f" || "$1" == "--firefox" ]] && updateFirefoxAddons [[ "$1" == "-ffz" || "$1" == "--frankerfacez" ]] && updateFFZ [[ "$1" == "-gsr" || "$1" == "--gpu-screen-recorder" ]] && updateGSR