gnome3.updateScript: reuse gnome-update-script
This commit is contained in:
parent
59a94b57f0
commit
30f090ff7b
1 changed files with 11 additions and 7 deletions
|
@ -3,10 +3,14 @@
|
|||
|
||||
let
|
||||
python = python3.withPackages (p: [ p.requests ]);
|
||||
in writeScript "update-${packageName}" ''
|
||||
#!${stdenv.shell}
|
||||
set -o errexit
|
||||
PATH=${lib.makeBinPath [ common-updater-scripts coreutils gnugrep gnused python ]}
|
||||
latest_tag=$(python "${./find-latest-version.py}" "${packageName}" "${versionPolicy}" "stable")
|
||||
update-source-version "${attrPath}" "$latest_tag"
|
||||
''
|
||||
updateScript = writeScript "gnome-update-script" ''
|
||||
#!${stdenv.shell}
|
||||
set -o errexit
|
||||
package_name="$1"
|
||||
attr_path="$2"
|
||||
version_policy="$3"
|
||||
PATH=${lib.makeBinPath [ common-updater-scripts coreutils gnugrep gnused python ]}
|
||||
latest_tag=$(python "${./find-latest-version.py}" "$package_name" "$version_policy" "stable")
|
||||
update-source-version "$attr_path" "$latest_tag"
|
||||
'';
|
||||
in [ updateScript packageName attrPath versionPolicy ]
|
||||
|
|
Loading…
Reference in a new issue