Jump to content

I made a thing: 

appinstall.sh

it's a script to help new users install applications on Linux via CLI, since the GUI methods are not always the best option. you just run it, tell it what apps you want to install and done :)

 

full source code for those who are curious: 

 

echo "install script for apps on Linux"

 

echo "what distro do you use? please reply with 1 for debian/ubuntu or 2 for manjaro/arch"

read distro

 

if [ $distro = 1 ]; then

echo "updating"

sudo apt update

sudo apt upgrade -y

sudo snap refresh

echo "update done"

fi

 

if [ $distro = 2 ]; then

echo "updating and installing snapd"

sudo pacman -Syyu

sudo pacman -S snapd

sudo snap refresh

sudo snap refresh

echo "update done"

fi


 

echo "installing your pre-defined apps, please wait"

#you can list apps here, and they will be installed without you having to type them in. do not input spotify or discord here!

#apps2 = LIST APPS HERE AND UNCOMMENT THIS LINE

 

if [ $distro = 1 ]; then

sudo apt install $apps2 -y

fi

 

if [ $distro = 2 ]; then

sudo pacman -S $apps2

fi

echo "done"

 

echo "what apps do you wish to install? WARNING: do not input spotify or discord here!!!"

read apps

 

if [ $distro = 1 ]; then

sudo apt install $apps -y

fi

 

if [ $distro = 2 ]; then

sudo pacman -S $apps

fi

 

echo "do you want to install spotify, discord or both? please reply with 1 for spotify, 2 for discord, 3 for both or 4 for none"

read snaps

 

if [ $snaps = 1 ]; then

sudo snap install spotify

fi

 

if [ $snaps = 2 ]; then

sudo snap install discord

fi

 

if [ $snaps = 3 ]; then

sudo snap install spotify

sudo snap install discord

fi

 

echo "Done! a reboot is recommended. do you want to reboot now? Reply with 1 for reboot, or 0 to exit to terminal."

read reboot

 

if [ $reboot = 1 ]; then

reboot

fi

 

if [ $reboot = 0 ]; then

exit

fi

  1. xKyric

    xKyric

    That's pretty cool! Out of curiosity, why won't Discord and Spotify install with the rest of the applications?

  2. Ashley MLP Fangirl

    Ashley MLP Fangirl

    @xKyric because they aren’t in the repo’s afaik and you have to install them through snap, which is a seperate command. That’s why i had to do this that way

  3. soldier_ph

    soldier_ph

    uWu this will come in handy. Thanks for making.

×