1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/applications/version-management/smartgithg/install_freedesktop_items.sh

12 lines
524 B
Bash
Executable file

#!@shell@
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