File tree Expand file tree Collapse file tree 2 files changed +23
-4
lines changed Expand file tree Collapse file tree 2 files changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -26,3 +26,4 @@ bash install-tools.sh
2626
2727# OS Tested
2828- Debian GNU/Linux 9 (stretch) 64-bit
29+ - Ubuntu 18.04.1 LTS (Bionic Beaver) 64-bit
Original file line number Diff line number Diff line change 33echo " Run install tools"
44sleep 1
55echo " Updating repositories.."
6- sudo apt update
76
8- tools_requirements=(sudo git sed make wget curl)
9- tools_to_install=(vim tmux htop zsh nmap screen i3lock-fancy glances);
7+ comprobate_gpl (){
8+ local return_=1
9+ which $1 > /dev/null 2>&1 || { local return_=0; }
10+ echo " $return_ "
11+ }
12+
13+ yum=$( comprobate_gpl " yum" )
14+ apt=$( comprobate_gpl " apt" )
15+ if [ $apt -eq " 1" ]; then
16+ sudo apt update
17+ elif [ $yum -eq " 1" ]; then
18+ sudo yum update
19+ fi
20+
21+ tools_requirements=(git sed make wget curl)
22+ tools_to_install=(vim tmux htop nmap screen i3lock-fancy glances zsh);
1023plugins_zsh=(git docker npm python sudo systemd web-search)
1124
1225
@@ -32,7 +45,11 @@ check_tool_and_install(){
3245 echo_pass $1
3346 else
3447 echo_fail $1
35- sudo apt install $1 -y
48+ if [ $apt -eq " 1" ]; then
49+ sudo apt install $1 -y
50+ elif [ $yum -eq " 1" ]; then
51+ sudo yum install $1 -y
52+ fi
3653 if [ " $1 " = " zsh" ]; then
3754 install_oh_my_zsh
3855 elif [ " $1 " = " i3lock-fancy" ]; then
@@ -85,6 +102,7 @@ install_requirements(){
85102 done
86103}
87104
105+
88106install_requirements
89107
90108echo " Total tools: ${# tools_to_install[@]} " ;
You can’t perform that action at this time.
0 commit comments