Skip to content

Instantly share code, notes, and snippets.

@Kolyall
Created March 7, 2023 08:40
Show Gist options
  • Save Kolyall/9dd3218c9bc462d91c1905823f66bdf2 to your computer and use it in GitHub Desktop.
Save Kolyall/9dd3218c9bc462d91c1905823f66bdf2 to your computer and use it in GitHub Desktop.
android.sh
#!/bin/bash
# Путь к Android Studio
android_studio_path=/home/marina/android/android-studio
# Путь к иконке приложения
icon_path=${android_studio_path}/bin/studio.png
# Путь к ярлыку на рабочем столе
desktop_path=~/Desktop/AndroidStudio.desktop
# Создаем файл ярлыка на рабочем столе
touch ${desktop_path}
# Добавляем информацию о ярлыке в файл
echo "[Desktop Entry]" >> ${desktop_path}
echo "Type=Application" >> ${desktop_path}
echo "Encoding=UTF-8" >> ${desktop_path}
echo "Name=Android Studio" >> ${desktop_path}
echo "Comment=Integrated Development Environment for Android" >> ${desktop_path}
echo "Icon=${icon_path}" >> ${desktop_path}
echo "Exec=${android_studio_path}/bin/studio.sh" >> ${desktop_path}
echo "Terminal=false" >> ${desktop_path}
echo "Categories=Development;IDE;" >> ${desktop_path}
# Делаем файл ярлыка исполняемым
chmod +x ${desktop_path}
echo "Ярлык для Android Studio создан на рабочем столе."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment