aboutsummaryrefslogtreecommitdiffstats
path: root/sys/nixpkgs/pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'sys/nixpkgs/pkgs')
-rwxr-xr-xsys/nixpkgs/pkgs/scripts/source/apps/fupdate.sh19
1 files changed, 15 insertions, 4 deletions
diff --git a/sys/nixpkgs/pkgs/scripts/source/apps/fupdate.sh b/sys/nixpkgs/pkgs/scripts/source/apps/fupdate.sh
index e398f0fd..ba2dc88b 100755
--- a/sys/nixpkgs/pkgs/scripts/source/apps/fupdate.sh
+++ b/sys/nixpkgs/pkgs/scripts/source/apps/fupdate.sh
@@ -12,6 +12,8 @@ AUTHORS="Soispha"
# shellcheck disable=SC2034
YEARS="2023"
+UPDATE_SCRIPT_NOT_WANTED=false
+
# Searches upward for a `UPDATE_SCRIPT_NAME` script
# Returns a path to the script if it exists, otherwise nothing is returned
check_for_update_script() {
@@ -80,7 +82,9 @@ update() {
nix flake update
- [ "$update_script" = "" ] || "$update_script" "$@"
+ if ! [ "$update_script" = "" ] && [ "$UPDATE_SCRIPT_NOT_WANTED" = "true" ]; then
+ "$update_script" "$@"
+ fi
if grep '[^0-9]_[0-9]' flake.lock >/dev/null; then
batgrep '[^0-9]_[0-9]' flake.lock
@@ -92,18 +96,22 @@ help() {
cat <<EOF
This is a Nix flake update manager.
-Usage:
+USAGE:
$NAME [--help]
-Options:
+OPTIONS:
--help | -h
Display this help and exit.
+
--version | -v
Display version and copyright information and exit.
-Commands:
+ --no-script
+ Avoid running the 'update.sh' script
+COMMANDS:
flake
update the flake project
+
<some other command>
runs a executable called "update-<some other command>", if it exists
EOF
@@ -142,6 +150,9 @@ for input in "$@"; do
version
exit 0
;;
+ "--no-script" | "-n")
+ UPDATE_SCRIPT_NOT_WANTED=true
+ ;;
"--")
end_of_cli_options=true
;;