summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xnix-script-switch.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/nix-script-switch.sh b/nix-script-switch.sh
index 6d14122..e91fe8c 100755
--- a/nix-script-switch.sh
+++ b/nix-script-switch.sh
@@ -223,7 +223,7 @@ then
stderr "'$NIXPKGS' is not a directory, so can't be a nixpkgs clone" && \
exit 1
- commit=$(nixos-version | cut -d . -f 3 | cut -d " " -f 1)
+ commit=$(nixos-version | sed -r 's,(.*)\.(.*)\ (.*),\2,')
if [[ $DO_UPSTREAM_UPDATE -eq 1 ]]
then