forked from mirrors/nixpkgs
copyDesktopItems: Use variable for repeated path
Co-authored-by: K900 <me@0upti.me>
This commit is contained in:
parent
d1bbb2b3d6
commit
5eb21a55ee
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue