3
0
Fork 0
forked from mirrors/nixpkgs

copyDesktopItems: Use variable for repeated path

Co-authored-by: K900 <me@0upti.me>
This commit is contained in:
toonn 2022-03-21 16:25:12 +01:00 committed by Alyssa Ross
parent d1bbb2b3d6
commit 5eb21a55ee

View file

@ -28,16 +28,15 @@ copyDesktopItems() {
return
fi
applications="${!outputBin}/share/applications"
for desktopItem in $desktopItems; do
if [[ -f "$desktopItem" ]]; then
echo \
"Copying '$desktopItem' into '${!outputBin}/share/applications'"
install -D -m 444 -t "${!outputBin}"/share/applications \
"$desktopItem"
echo "Copying '$desktopItem' into '${applications}'"
install -D -m 444 -t "${applications}" "$desktopItem"
else
for f in "$desktopItem"/share/applications/*.desktop; do
echo "Copying '$f' into '${!outputBin}/share/applications'"
install -D -m 444 -t "${!outputBin}"/share/applications "$f"
echo "Copying '$f' into '${applications}'"
install -D -m 444 -t "${applications}" "$f"
done
fi
done