1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 14:11:36 +00:00
nixpkgs/pkgs/applications/version-management/smartgithg/install_freedesktop_items.sh
Raymond Gauthier 738acf0651 smartgithg: 7.0.0 -> 7.0.2
Also adapted package's freedesktop item install
script so that it works in the context of nix.
(i.e.: icons and `*.desktop` file now properly
installed by the package).
2015-09-23 22:40:03 -04:00

12 lines
524 B
Bash
Executable file

#!/bin/sh
inBinDir=$1
out=$2
cat $inBinDir/add-menuitem.sh | \
sed -re 's#xdg-icon-resource[ ]+install[ ]+--size[ ]+([0-9]+)[ ]+("[^"]+")[ ]+([$0-9a-zA-Z_]+)#mkdir -p '${out}'/share/icons/hicolor/\1x\1/apps \&\& cp \2 '${out}'/share/icons/hicolor/\1x\1/apps/\3\.png #' | \
sed -re 's#xdg-desktop-menu[ ]+install[ ]+([$0-9a-zA-Z_]+)#mkdir -p '${out}'/share/applications \&\& cp \1 '${out}'/share/applications/#' | \
sed -re 's#Exec="[^"]+"#Exec=smartgit#' |
sed -re 's#SMARTGIT_BIN=.*#'SMARTGIT_BIN=${inBinDir}'#' \
| bash