yggInit added + .
This commit is contained in:
parent
ac3b910dd6
commit
c9387d1df6
3 changed files with 62 additions and 32 deletions
|
@ -100,6 +100,56 @@ function isMate () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# check and install required dependencies for Yggdrasil
|
||||||
|
#
|
||||||
|
function yggInit () {
|
||||||
|
if ! which gem >/dev/null; then
|
||||||
|
printf "[INIT][GEM] not found, installing...\n"
|
||||||
|
printf "\n[INIT][GEM] not found, installing...\n" &>> $logFile
|
||||||
|
installPackage apt "ruby-dev"
|
||||||
|
else
|
||||||
|
printf "[INIT][GEM] found [ ""$BOLDVERT""OK"$NORMAL" ] \n"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! which snap >/dev/null; then
|
||||||
|
printf "[INIT][SNAP] not found, installing...\n"
|
||||||
|
printf "\n[INIT][SNAP] not found, installing...\n" &>> $logFile
|
||||||
|
installPackage apt "snapd"
|
||||||
|
else
|
||||||
|
printf "[INIT][SNAP] found [ ""$BOLDVERT""OK"$NORMAL" ] \n"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! which npm >/dev/null; then
|
||||||
|
printf "[INIT][NPM] not found, installing...\n"
|
||||||
|
printf "\n[INIT][NPM] not found, installing...\n" &>> $logFile
|
||||||
|
installPackage apt "npm"
|
||||||
|
else
|
||||||
|
printf "[INIT][NPM] found [ ""$BOLDVERT""OK"$NORMAL" ] \n"
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf "[INIT]"
|
||||||
|
installPackage apt "apt-transport-https"
|
||||||
|
|
||||||
|
if ! which pip3 >/dev/null; then
|
||||||
|
printf "[INIT][PIP] not found, installing...\n"
|
||||||
|
printf "\n[INIT][PIP] not found, installing...\n" &>> $logFile
|
||||||
|
printf "[INIT]"
|
||||||
|
installPackage apt "python3-pip"
|
||||||
|
printf "[INIT]"
|
||||||
|
installPackage pip "pip"
|
||||||
|
printf "[INIT]"
|
||||||
|
installPackage pip "setuptools"
|
||||||
|
else
|
||||||
|
printf "[INIT][PIP] found [ ""$BOLDVERT""OK"$NORMAL" ] \n"
|
||||||
|
printf "[INIT]"
|
||||||
|
installPackage pip "pip"
|
||||||
|
printf "[INIT]"
|
||||||
|
installPackage pip "setuptools"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# system update
|
# system update
|
||||||
#TODO: add pip, npm, gem
|
#TODO: add pip, npm, gem
|
||||||
|
@ -125,19 +175,13 @@ function updateSystem () {
|
||||||
ret_code=$?
|
ret_code=$?
|
||||||
retCode $ret_code
|
retCode $ret_code
|
||||||
|
|
||||||
if ! which snap >/dev/null; then
|
if which snap >/dev/null; then
|
||||||
printf "[ERR] snap not found, installing...\n"
|
|
||||||
printf "\n[ERR] snap not found, installing...\n" &>> $logFile
|
|
||||||
installPackage apt "snapd"
|
|
||||||
ret_code=$?
|
|
||||||
if [ $ret_code == 0 ]; then
|
|
||||||
printf "[SNAP] refresh "
|
printf "[SNAP] refresh "
|
||||||
printf "\n[SNAP] refresh\n" &>> $logFile
|
printf "\n[SNAP] refresh\n" &>> $logFile
|
||||||
sudo snap refresh &>> $logFile
|
sudo snap refresh &>> $logFile
|
||||||
ret_code=$?
|
ret_code=$?
|
||||||
retCode $ret_code
|
retCode $ret_code
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
repoAdded=0
|
repoAdded=0
|
||||||
}
|
}
|
||||||
|
@ -278,12 +322,6 @@ function installPackage () {
|
||||||
sudo -H pip3 install --upgrade $pkg &>> $logFile
|
sudo -H pip3 install --upgrade $pkg &>> $logFile
|
||||||
ret_code=$?
|
ret_code=$?
|
||||||
retCode $ret_code
|
retCode $ret_code
|
||||||
else
|
|
||||||
printf "[ERR] pip3 not found, installing...\n"
|
|
||||||
printf "\n[ERR] pip3 not found, installing...\n" &>> $logFile
|
|
||||||
installPackage apt "python3-pip"
|
|
||||||
installPackage pip "pip"
|
|
||||||
installPackage pip "setuptools"
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"npm")
|
"npm")
|
||||||
|
@ -293,10 +331,6 @@ function installPackage () {
|
||||||
sudo npm install -g $pkg &>> $logFile
|
sudo npm install -g $pkg &>> $logFile
|
||||||
ret_code=$?
|
ret_code=$?
|
||||||
retCode $ret_code
|
retCode $ret_code
|
||||||
else
|
|
||||||
printf "[ERR] npm not found, installing...\n"
|
|
||||||
printf "\n[ERR] npm not found, installing...\n" &>> $logFile
|
|
||||||
installPackage apt "npm"
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"gem")
|
"gem")
|
||||||
|
@ -306,10 +340,6 @@ function installPackage () {
|
||||||
sudo gem install $pkg &>> $logFile
|
sudo gem install $pkg &>> $logFile
|
||||||
ret_code=$?
|
ret_code=$?
|
||||||
retCode $ret_code
|
retCode $ret_code
|
||||||
else
|
|
||||||
printf "[ERR] gem not found, installing...\n"
|
|
||||||
printf "\n[ERR] gem not found, installing...\n" &>> $logFile
|
|
||||||
installPackage apt "ruby-dev"
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"snap")
|
"snap")
|
||||||
|
@ -319,10 +349,6 @@ function installPackage () {
|
||||||
sudo snap install $pkg --classic &>> $logFile
|
sudo snap install $pkg --classic &>> $logFile
|
||||||
ret_code=$?
|
ret_code=$?
|
||||||
retCode $ret_code
|
retCode $ret_code
|
||||||
else
|
|
||||||
printf "[ERR] snap not found, installing...\n"
|
|
||||||
printf "\n[ERR] snap not found, installing...\n" &>> $logFile
|
|
||||||
installPackage apt "snapd"
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -433,7 +433,6 @@ function addSpecificRepo_DockerCE () {
|
||||||
"deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable"
|
"deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Gyazo
|
# Gyazo
|
||||||
#
|
#
|
||||||
|
|
|
@ -41,6 +41,7 @@ echo "--[ Yggdrasil log ]--[ "$cDate" ]--[ "$cTime" ]-----------------------" >>
|
||||||
while getopts ":h,v,f,c,t,u" option; do
|
while getopts ":h,v,f,c,t,u" option; do
|
||||||
case "$option" in
|
case "$option" in
|
||||||
t) #test purpose only
|
t) #test purpose only
|
||||||
|
yggInit
|
||||||
#installIdea
|
#installIdea
|
||||||
#installNetTools
|
#installNetTools
|
||||||
installOffice
|
installOffice
|
||||||
|
@ -48,9 +49,9 @@ while getopts ":h,v,f,c,t,u" option; do
|
||||||
;;
|
;;
|
||||||
f) # install all apps
|
f) # install all apps
|
||||||
#TODO:
|
#TODO:
|
||||||
|
yggInit
|
||||||
updateSystem
|
updateSystem
|
||||||
addRequiredPPA
|
addRequiredPPA
|
||||||
msg "Installing all Apps"
|
|
||||||
installBase
|
installBase
|
||||||
installBurningTools
|
installBurningTools
|
||||||
installCajaPlugins
|
installCajaPlugins
|
||||||
|
@ -70,12 +71,13 @@ while getopts ":h,v,f,c,t,u" option; do
|
||||||
;;
|
;;
|
||||||
c) # install themes and icons
|
c) # install themes and icons
|
||||||
#TODO:
|
#TODO:
|
||||||
msg "Installing all Themes and Icons"
|
yggInit
|
||||||
installIcons
|
installIcons
|
||||||
installThemes
|
installThemes
|
||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
u)
|
u)
|
||||||
|
yggInit
|
||||||
updateSystem
|
updateSystem
|
||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
|
@ -119,6 +121,9 @@ uname -m
|
||||||
# Useless by itself, but is used to don't be annoyed later in the script
|
# Useless by itself, but is used to don't be annoyed later in the script
|
||||||
sudo echo
|
sudo echo
|
||||||
|
|
||||||
|
# check and install/update dependencies
|
||||||
|
yggInit
|
||||||
|
|
||||||
pressKey
|
pressKey
|
||||||
|
|
||||||
# Apps dir created if necessary
|
# Apps dir created if necessary
|
||||||
|
|
Loading…
Reference in a new issue