Compare commits
35 Commits
b3af44668a
...
master
Author | SHA1 | Date | |
---|---|---|---|
3dc64233d5 | |||
f2c024cd51 | |||
074a67e7eb | |||
209f1a3cac | |||
a40948c75e | |||
fea0297084 | |||
258e3d47dc | |||
d7c5624bd6 | |||
59c99ff53e | |||
fb948873c6 | |||
8369dbd3da | |||
9392b7e31a | |||
72fd45736a | |||
92e0df51b0 | |||
4355f3d8ff | |||
1883d06278 | |||
2488944619 | |||
50f0314b6e | |||
39aaad5394 | |||
23571d6b88 | |||
aba0c5eed1 | |||
92943c0905 | |||
d4d04837d2 | |||
30d9570392 | |||
a4152fc2ad | |||
9cfd4044f1 | |||
4e3fbd5e61 | |||
b08827a116 | |||
9e02989b18 | |||
aa648c90ff | |||
0b9c115f0b | |||
340c65178e | |||
0c01933424 | |||
9898475746 | |||
8579114cd0 |
42
README.md
42
README.md
@@ -1,26 +1,35 @@
|
||||
# Installify
|
||||
Installify is a Bash shell script to download new software and applications.
|
||||
|
||||
## Applications & Software
|
||||
* Android Studio (TO-DO)
|
||||
* Bootstrap Studio
|
||||
* Chromium (TO-DO)
|
||||
* Defold (TO-DO)
|
||||
* Discord (TO-DO)
|
||||
* Docker (TO-DO)
|
||||
* Firefox
|
||||
## Important installs
|
||||
Important installs are installs that might be needed to install other software. These installs will have a prioritisation over the rest of the files.
|
||||
|
||||
* Gcc
|
||||
* Git
|
||||
* Node
|
||||
* Golang
|
||||
* Node/NVM
|
||||
* Open-jdk
|
||||
* PHP
|
||||
|
||||
## Applications & Software
|
||||
* ADB
|
||||
* Bootstrap Studio
|
||||
* Chrome
|
||||
* Chromium
|
||||
* Defold
|
||||
* Discord (TO-DO)
|
||||
* Docker
|
||||
* Firefox
|
||||
* Ionic
|
||||
* NordVPN
|
||||
* OBS
|
||||
* PHP
|
||||
* Python (TO-DO)
|
||||
* Yarn
|
||||
* Open-jdk
|
||||
* Postman
|
||||
* Slack
|
||||
* Spotify
|
||||
* Teams
|
||||
* TypeScript
|
||||
* Visual Studio Code
|
||||
* Yarn
|
||||
* Xampp (TO-DO)
|
||||
* ZSH (TO-DO)
|
||||
* Missing any applications or software? Feel free to leave an issue behind or create a merge request with the created files :)
|
||||
@@ -28,12 +37,12 @@ Installify is a Bash shell script to download new software and applications.
|
||||
# Use
|
||||
|
||||
```console
|
||||
wget -P ~/ https://git.aterve.com/Spekulaas/BashInstaller/archive/master.zip
|
||||
wget -P ~/ https://git.aterve.com/Spekulaas/installify/archive/master.zip
|
||||
unzip ~/master.zip
|
||||
```
|
||||
or with git
|
||||
```console
|
||||
$ git clone https://git.aterve.com/Spekulaas/BashInstaller.git
|
||||
$ git clone https://git.aterve.com/Spekulaas/installify.git
|
||||
```
|
||||
|
||||
`cd $PATH_TO/Installify` and run the script interactively using `sudo ./install.sh [argunments]`:
|
||||
@@ -77,6 +86,5 @@ Install all files with Oh-My-Zsh:
|
||||
$ sudo ./install.sh -az
|
||||
```
|
||||
|
||||
## TO-DO
|
||||
Name change BashInstaller -> Installify
|
||||
# TO-DO
|
||||
See applications and software tab
|
85
install.sh
85
install.sh
@@ -40,23 +40,36 @@ zsh_prompt() {
|
||||
fi
|
||||
|
||||
# run option
|
||||
if [[ ${zshOption,,} = "n" ]]; then
|
||||
return
|
||||
elif [[ ${zshOption,,} = "y" ]]; then
|
||||
echo "nice choice lets use zsh"
|
||||
if [[ ${zshOption,,} = "y" ]]; then
|
||||
# Create temporary zsh file
|
||||
touch $homedir/.tempzshrc
|
||||
|
||||
# set up the basics of zsh
|
||||
sh src/services/zsh/zsh.sh
|
||||
fi
|
||||
}
|
||||
|
||||
get_files() {
|
||||
|
||||
# Create temp place where files will be stored
|
||||
cd src/applications
|
||||
cd src/importantinstalls
|
||||
> ../temp/importantinstalls.txt
|
||||
> ../temp/installations.txt
|
||||
|
||||
# File info
|
||||
applications=""
|
||||
counter=0
|
||||
|
||||
|
||||
for file in *; do
|
||||
# Every .sh file in application folder will be noted in installations.txt
|
||||
if [[ $file == *.sh ]]; then
|
||||
echo "${file%.*}" >> ../temp/importantinstalls.txt
|
||||
fi
|
||||
done
|
||||
|
||||
cd ../applications
|
||||
|
||||
# Write every file name into installations
|
||||
for file in *; do
|
||||
# Every .sh file in application folder will be noted in installations.txt
|
||||
@@ -80,6 +93,9 @@ select_files() {
|
||||
printf %s "$YELLOW"
|
||||
# Show all the options
|
||||
echo "The following items will be installed."
|
||||
echo "-------------Must install-------------"
|
||||
cat importantinstalls.txt
|
||||
echo "--------------------------------------"
|
||||
cat installations.txt
|
||||
|
||||
printf %s "$RESET"
|
||||
@@ -117,6 +133,9 @@ select_files() {
|
||||
|
||||
printf %s "$YELLOW"
|
||||
echo "The following items will be installed."
|
||||
echo "-------------Must install-------------"
|
||||
cat importantinstalls.txt
|
||||
echo "--------------------------------------"
|
||||
cat installations.txt
|
||||
echo
|
||||
printf %s "$RESET"
|
||||
@@ -132,6 +151,20 @@ select_files() {
|
||||
install_files() {
|
||||
# Check if debug is activated
|
||||
if $debug; then
|
||||
|
||||
# Download important files
|
||||
while read line; do
|
||||
|
||||
#Reading each line and execute file
|
||||
if ! [ -x "$(command -v $line)" ]; then
|
||||
sh ../importantinstalls/$line.sh
|
||||
else
|
||||
echo "$line is already installed"
|
||||
fi
|
||||
|
||||
done < "importantinstalls.txt"
|
||||
|
||||
# Download the selected applications
|
||||
while read line; do
|
||||
|
||||
#Reading each line and execute file
|
||||
@@ -148,6 +181,7 @@ install_files() {
|
||||
start=1
|
||||
end=100
|
||||
amount="$(wc -l < installations.txt)"
|
||||
amount=$(($amount + "$(wc -l < importantinstalls.txt)"))
|
||||
amount=$(($end / $amount))
|
||||
|
||||
# set design
|
||||
@@ -155,10 +189,33 @@ install_files() {
|
||||
|
||||
printf %s "$YELLOW"
|
||||
echo "The following items are going to be installed:"
|
||||
cat importantinstalls.txt
|
||||
cat installations.txt
|
||||
echo ""
|
||||
printf %s "$RESET"
|
||||
|
||||
# download important files
|
||||
while read line; do
|
||||
printf %s "$YELLOW"
|
||||
|
||||
ProgressBar ${start} ${end} ${line}
|
||||
#Reading each line and execute file
|
||||
if ! [ -x "$(command -v $line)" ]; then
|
||||
sh ../importantinstalls/$line.sh >> /dev/null 2>&1
|
||||
fi
|
||||
|
||||
# update progressbar
|
||||
reach=$(( $start + $amount ))
|
||||
for number in $(seq ${start} ${reach}); do
|
||||
ProgressBar ${number} ${end} ${line}
|
||||
sleep 0.02
|
||||
done
|
||||
printf %s "$RESET"
|
||||
start=$reach
|
||||
|
||||
done < "importantinstalls.txt"
|
||||
|
||||
# download selected applications
|
||||
while read line; do
|
||||
printf %s "$YELLOW"
|
||||
|
||||
@@ -182,7 +239,9 @@ install_files() {
|
||||
# Completing
|
||||
if [[ $start != 100 ]]; then
|
||||
for number in $(seq ${start} 100); do
|
||||
printf %s "$YELLOW"
|
||||
ProgressBar ${number} ${end} "..."
|
||||
printf %s "$RESET"
|
||||
sleep 0.02
|
||||
done
|
||||
fi
|
||||
@@ -231,6 +290,14 @@ check_sudo_arguments() {
|
||||
main
|
||||
}
|
||||
|
||||
install_oh_my_zsh() {
|
||||
# run option
|
||||
if [[ ${zshOption,,} = "y" ]]; then
|
||||
# Run Ohmyzsh (ends script)
|
||||
sh services/zsh/Oh-My-ZSH.sh
|
||||
fi
|
||||
}
|
||||
|
||||
main() {
|
||||
# check if the computer has a stable connections
|
||||
source ./src/services/connection.sh
|
||||
@@ -264,6 +331,8 @@ main() {
|
||||
cd $dir
|
||||
cd src
|
||||
rm temp/*
|
||||
|
||||
install_oh_my_zsh
|
||||
}
|
||||
|
||||
# PROGRAM BODY
|
||||
@@ -271,8 +340,8 @@ main() {
|
||||
dir="$(pwd)"
|
||||
|
||||
# Make sure the code is runned in the right way
|
||||
if [[ `basename "$dir"` != "BashInstaller" ]]; then
|
||||
echo "Please run this script in the Bashinstaller folder."
|
||||
if [[ `basename "$dir"` != "installify" ]]; then
|
||||
echo "Please run this script in the installify folder."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -292,6 +361,8 @@ homedir="$(getent passwd $SUDO_USER | cut -d: -f6)"
|
||||
debug=false
|
||||
downloadall=false
|
||||
usezsh=""
|
||||
echo $homedir
|
||||
sleep 10
|
||||
|
||||
# run the program
|
||||
if [ $# -eq 0 ]; then
|
||||
|
@@ -1,2 +0,0 @@
|
||||
sudo apt install zsh -y
|
||||
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" -y
|
2
src/applications/adb.sh
Normal file
2
src/applications/adb.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
sudo apt-get update
|
||||
sudo apt-get install android-tools-adb -y
|
2
src/applications/chrome.sh
Normal file
2
src/applications/chrome.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
sudo -u $SUDO_USER wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
|
||||
sudo dpkg -i google-chrome-stable_current_amd64.deb
|
2
src/applications/chromium.sh
Normal file
2
src/applications/chromium.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
sudo apt update
|
||||
sudo apt install chromium-browser -y
|
23
src/applications/defold.sh
Executable file
23
src/applications/defold.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
# Get logo and zip
|
||||
wget https://d.defold.com/editor2/channels/editor-alpha/Defold-x86_64-linux.zip
|
||||
wget https://defold.com/images/logo/defold/logo/logo-ver-classic-white-160.png
|
||||
|
||||
# Move to bin location
|
||||
sudo unzip Defold-x86_64-linux.zip -d "/usr/bin"
|
||||
sudo mv logo-ver-classic-white-160.png /usr/bin/Defold/logo.png
|
||||
|
||||
# Create shortcut file and set info
|
||||
touch Defold.desktop
|
||||
{
|
||||
echo '[Desktop Entry]'
|
||||
echo 'Type=Application'
|
||||
echo 'Encoding=UTF-8'
|
||||
echo 'Name=Defold'
|
||||
echo 'Comment=Defold Editor 2'
|
||||
echo 'Exec=/usr/bin/Defold/Defold'
|
||||
echo 'Terminal=false'
|
||||
echo 'Icon=/usr/bin/Defold/logo.png'
|
||||
} >> Defold.desktop
|
||||
|
||||
# move file to applications
|
||||
sudo mv Defold.desktop /usr/share/applications/defold.desktop
|
15
src/applications/docker.sh
Executable file
15
src/applications/docker.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
sudo apt-get update
|
||||
sudo apt-get install \
|
||||
apt-transport-https \
|
||||
ca-certificates \
|
||||
curl \
|
||||
gnupg \
|
||||
lsb-release -y
|
||||
|
||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
|
||||
echo \
|
||||
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
|
||||
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose -y
|
@@ -1,2 +1,2 @@
|
||||
sudo apt-get update
|
||||
sudo apt install firefox
|
||||
sudo apt update
|
||||
sudo apt install firefox -y
|
@@ -1,2 +0,0 @@
|
||||
sudo apt-get update
|
||||
sudo apt-get install git
|
4
src/applications/ionic.sh
Normal file
4
src/applications/ionic.sh
Normal file
@@ -0,0 +1,4 @@
|
||||
# remove older versions if needed
|
||||
npm uninstall -g ionic
|
||||
# install ionic
|
||||
npm install -g @ionic/cli
|
@@ -1,3 +0,0 @@
|
||||
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
|
||||
./../applications/gcc.sh
|
||||
sudo apt-get install -y nodejs
|
@@ -1,2 +1,2 @@
|
||||
sudo apt update
|
||||
sudo apt install obs-studio
|
||||
sudo apt install obs-studio -y
|
@@ -1,2 +0,0 @@
|
||||
sudo apt update
|
||||
sudo apt install default-jdk
|
36
src/applications/postman.sh
Normal file
36
src/applications/postman.sh
Normal file
@@ -0,0 +1,36 @@
|
||||
# Get install file
|
||||
wget https://dl.pstmn.io/download/latest/linux64
|
||||
|
||||
# Extract file
|
||||
sudo tar -xvf linux64 -C /usr/bin
|
||||
|
||||
# export postman to env table
|
||||
if [[ $(which zsh) == "/usr/bin/zsh" ]]; then
|
||||
echo '# Postman path' >> ~/.tempzshrc
|
||||
echo 'export PATH="$PATH:/usr/bin/Postman"' >> ~/.tempzshrc
|
||||
source ~/.tempzshrc
|
||||
fi
|
||||
|
||||
# always put in bashrc aswell, so that the user can always rely on the standard shell
|
||||
echo '# Postman path' >> ~/.bashrc
|
||||
echo 'export PATH="$PATH:/usr/bin/Postman"' >> ~/.bashrc
|
||||
source ~/.bashrc
|
||||
|
||||
# Create file and set info
|
||||
touch Postman.desktop
|
||||
{
|
||||
echo '[Desktop Entry]'
|
||||
echo 'Name=Postman API Tool'
|
||||
echo 'GenericName=Postman'
|
||||
echo 'Comment=Testing API'
|
||||
echo 'Exec=/usr/bin/Postman/Postman'
|
||||
echo 'Terminal=false'
|
||||
echo 'X-MultipleArgs=false'
|
||||
echo 'Type=Application'
|
||||
echo 'Icon=/usr/bin/Postman/app/resources/app/assets/icon.png'
|
||||
echo 'StartupWMClass=Postman'
|
||||
echo 'StartupNotify=true'
|
||||
} >> Postman.desktop
|
||||
|
||||
# move file to applications
|
||||
sudo mv Postman.desktop /usr/share/applications/Postman.Desktop
|
@@ -1,3 +1 @@
|
||||
sudo snap install slack --classic
|
||||
sudo apt-get update
|
||||
sudo apt-get upgrade slack-desktop
|
||||
sudo apt install slack-desktop -y
|
@@ -1,3 +1,3 @@
|
||||
curl -sS https://download.spotify.com/debian/pubkey_0D811D58.gpg | sudo apt-key add -
|
||||
curl -sS https://download.spotify.com/debian/pubkey_5E3C45D7B312C643.gpg | sudo apt-key add -
|
||||
echo "deb http://repository.spotify.com stable non-free" | sudo tee /etc/apt/sources.list.d/spotify.list
|
||||
sudo apt-get update && sudo apt-get install spotify-client -y
|
4
src/applications/teams.sh
Normal file
4
src/applications/teams.sh
Normal file
@@ -0,0 +1,4 @@
|
||||
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
|
||||
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/ms-teams stable main" > /etc/apt/sources.list.d/teams.list'
|
||||
sudo apt update
|
||||
sudo apt teams
|
1
src/applications/typescript.sh
Normal file
1
src/applications/typescript.sh
Normal file
@@ -0,0 +1 @@
|
||||
npm install typescript -g
|
@@ -1 +0,0 @@
|
||||
echo "defold"
|
@@ -1,3 +1,2 @@
|
||||
wget -O discord.deb "https://discordapp.com/api/download?platform=linux&format=deb"
|
||||
sudo -u $SUDO_USER wget -O discord.deb "https://discordapp.com/api/download?platform=linux&format=deb"
|
||||
sudo dpkg -i discord.deb
|
||||
echo "y" | sudo apt install -f
|
@@ -1 +0,0 @@
|
||||
apt-get update
|
@@ -1,2 +0,0 @@
|
||||
sudo apt-get update
|
||||
sudo apt install chromium -y
|
2
src/importantinstalls/git.sh
Executable file
2
src/importantinstalls/git.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
sudo apt-get update
|
||||
sudo apt-get install git -y
|
17
src/importantinstalls/golang.sh
Executable file
17
src/importantinstalls/golang.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
# Get the full html and get the link of the button
|
||||
wget https://go.dev/dl/
|
||||
|
||||
# get latest Linux download row
|
||||
latestversionsh="$(grep -w 'downloadBox' "index.html")"
|
||||
latestversionsh=$(echo "$latestversionsh" | grep 'linux')
|
||||
|
||||
a="$(grep -w 'data-linux="' "download")"
|
||||
latestversionsh=${latestversionsh#*'href="'}
|
||||
latestversionsh=${latestversionsh%'">'*}
|
||||
|
||||
# Download latest golang version
|
||||
wget "https://go.dev"$latestversionsh
|
||||
|
||||
# Remove any previous Go installation then extract the archive
|
||||
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.19.1.linux-amd64.tar.gz
|
||||
export PATH=$PATH:/usr/local/go/bin
|
18
src/importantinstalls/node.sh
Normal file
18
src/importantinstalls/node.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
# get nvm package
|
||||
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
|
||||
|
||||
# export nvm to env table
|
||||
if [[ $(which zsh) == "/usr/bin/zsh" ]]; then
|
||||
echo 'export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"' >> ~/.tempzshrc
|
||||
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.tempzshrc
|
||||
source ~/.tempzshrc
|
||||
fi
|
||||
|
||||
# always put in bashrc aswell, so that the user can always rely on the standard shell
|
||||
echo 'export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"' >> ~/.bashrc
|
||||
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc
|
||||
source ~/.bashrc
|
||||
|
||||
|
||||
# install latest version of node
|
||||
nvm install node
|
2
src/importantinstalls/openjdk.sh
Normal file
2
src/importantinstalls/openjdk.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
sudo apt update
|
||||
sudo apt install default-jdk -y
|
@@ -11,6 +11,6 @@ ProgressBar() {
|
||||
# program=$(printf "${_program}")
|
||||
|
||||
printf "\rProgress : |${fill// /▇}${empty// / }| ${_progress}%%"
|
||||
printf " Installing ${program} \r"
|
||||
printf " Installing ${program} \r"
|
||||
|
||||
}
|
2
src/services/zsh/Oh-My-ZSH.sh
Normal file
2
src/services/zsh/Oh-My-ZSH.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
# Get oh my zsh, after this command the install stios, since we switched shells
|
||||
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" -y
|
8
src/services/zsh/zsh.sh
Normal file
8
src/services/zsh/zsh.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
# install ZSH
|
||||
sudo apt-get update
|
||||
sudo apt-get install zsh -y
|
||||
|
||||
# Set ZSH as standard interface
|
||||
chsh -s $(which zsh)
|
||||
|
||||
source ~/.zshrc
|
Reference in New Issue
Block a user