File create-update-debian-menu-shortcut of Package kimi-utils-debian

#!/bin/bash
# How to create a specified Encoding
# "echo "$var" | iconv --from-code=utf-8 --to-code=utf-16le --output=file2.txt

fileDir="$(xdg-user-dir HOME)/.local/share/applications"

menuFileName="update-debian.desktop"
fullFilePath="$fileDir/$menuFileName"

if test -f "$fullFilePath" ; then
  rm -f "$fullFilePath"
fi

echo "[Desktop Entry]" >> "$fullFilePath"
# echo "Encoding=UTF-8" >> "$fullFilePath"
echo "Name=Update Debian" >> "$fullFilePath"
echo "Name[sv]=Uppdatera Debian" >> "$fullFilePath"
echo "Comment=Update system" >> "$fullFilePath"
echo "Comment[sv]=Uppdatera systemet" >> "$fullFilePath"
echo "Type=Application" >> "$fullFilePath"
echo "Terminal=true" >> "$fullFilePath"
echo "Icon=system-software-update" >> "$fullFilePath"
echo "Exec=sh -c 'sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get -y dist-upgrade'" >> "$fullFilePath"
echo "StartupWMClass=system" >> "$fullFilePath"
echo "Categories=System;" >> "$fullFilePath"

openSUSE Build Service is sponsored by