summary refs log tree commit diff
path: root/pkgs/build-support/upstream-updater/update-walker.sh
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2012-11-08 11:38:34 +0400
committerMichael Raskin <7c6f434c@mail.ru>2012-11-08 11:38:34 +0400
commitc7d2e34758d6c406669abc3807b3af353deb161b (patch)
treedb92704121a9a668b8b9e1032d022cc148757db6 /pkgs/build-support/upstream-updater/update-walker.sh
parentc2bc48aef38385fda0c68417cc4fc9c97adf365e (diff)
downloadnixpkgs-c7d2e34758d6c406669abc3807b3af353deb161b.tar
nixpkgs-c7d2e34758d6c406669abc3807b3af353deb161b.tar.gz
nixpkgs-c7d2e34758d6c406669abc3807b3af353deb161b.tar.bz2
nixpkgs-c7d2e34758d6c406669abc3807b3af353deb161b.tar.lz
nixpkgs-c7d2e34758d6c406669abc3807b3af353deb161b.tar.xz
nixpkgs-c7d2e34758d6c406669abc3807b3af353deb161b.tar.zst
nixpkgs-c7d2e34758d6c406669abc3807b3af353deb161b.zip
Add nspluginwrapper, a tool to execute browser plugins out-of-process
Diffstat (limited to 'pkgs/build-support/upstream-updater/update-walker.sh')
-rwxr-xr-xpkgs/build-support/upstream-updater/update-walker.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/build-support/upstream-updater/update-walker.sh b/pkgs/build-support/upstream-updater/update-walker.sh
index 12b12a11e89..caec95f6998 100755
--- a/pkgs/build-support/upstream-updater/update-walker.sh
+++ b/pkgs/build-support/upstream-updater/update-walker.sh
@@ -76,6 +76,10 @@ version () {
   echo "Version: $CURRENT_VERSION" >&2
 }
 
+ensure_version () {
+  [ -z "$CURRENT_VERSION" ] && version '.*-([0-9.]+)[-._].*' '\1'
+}
+
 hash () {
   CURRENT_HASH="$(nix-prefetch-url "$CURRENT_URL")"
 }
@@ -121,6 +125,7 @@ full_path () {
 process_config () {
   source "$(full_path "$1")"
   retrieve_version
+  ensure_version
   update_found && do_overwrite "$CURRENT_TARGET"
 }