Skip to content

Instantly share code, notes, and snippets.

@mabitt
Last active September 5, 2017 18:29
Show Gist options
  • Save mabitt/69f5c4a7cdea57ca34c9d3e7b29c0042 to your computer and use it in GitHub Desktop.
Save mabitt/69f5c4a7cdea57ca34c9d3e7b29c0042 to your computer and use it in GitHub Desktop.
Create AWS Stencils .desktop files for Calligra Flow
IFS=$'\n'
rm -rf GRAYSCALE
for D in `ls -1 -d -- */ `
do
echo "Creating $D/collection.desktop"
echo "[Desktop Entry]" > "$D/collection.desktop"
echo "Name=AWS_${D%?}" >> "$D/collection.desktop"
echo "Name[en_US]=AWS_${D%?}" >> "$D/collection.desktop"
done
for F in `find . -name "*.svg"`
do
echo "Creating ${F%.svg}.desktop"
filename=`echo ${F%.svg} | awk -F / '{print $NF}'`
echo "[Desktop Entry]" > "${F%.svg}.desktop"
echo "Name=$filename" >> "${F%.svg}.desktop"
echo "Name[en_US]=$filename" >> "${F%.svg}.desktop"
done
#Rename Dirs
for D in `ls -1 -d -- */ `
do
echo "Renaming $D"
mv "$D" "AWS $D"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment