yggdrasil_ng/install_functions_ub1804.sh

206 lines
6.1 KiB
Bash
Raw Permalink Normal View History

2018-05-26 21:33:31 +00:00
#-----------------------------------------------------------------------------#
# Yggdrasil NG #
# compatibility : see documentation or man pages #
# author : Francois B. (Makotosan/Shakasan) #
# licence : GPLv3 #
# website : https://makotonoblog.be/ #
#-----------------------------------------------------------------------------#
#-----------------------------------------------------------------------------#
# #
# Ubuntu 18.04 / Linux Mint 19 #
# #
#-----------------------------------------------------------------------------#
2017-12-30 22:08:45 +00:00
#-----------------------------------------------------------------------------#
# install functions #
2017-12-30 22:08:45 +00:00
#-----------------------------------------------------------------------------#
2018-03-21 07:14:10 +00:00
#
# Viber (headless)
#
function installViber () {
installPackageDpkg http://download.cdn.viber.com/cdn/desktop/Linux/viber.deb \
2018-05-03 23:15:38 +00:00
viber.deb \
no
2018-03-21 07:14:10 +00:00
}
2017-12-30 22:08:45 +00:00
2018-03-21 07:14:10 +00:00
#
# Viber (Menu)
#
function installViberMenu () {
2017-12-30 22:08:45 +00:00
installPackageDpkg http://download.cdn.viber.com/cdn/desktop/Linux/viber.deb \
2018-05-03 23:15:38 +00:00
viber.deb \
yes
2018-03-21 07:14:10 +00:00
}
2017-12-30 22:08:45 +00:00
2018-06-12 06:58:12 +00:00
#
2018-06-12 07:18:24 +00:00
# Slack (headless)
2018-06-12 06:58:12 +00:00
#
2018-06-12 07:18:24 +00:00
function installSlack () {
installPackageDpkg https://downloads.slack-edge.com/linux_releases/slack-desktop-4.3.2-amd64.deb \
2018-06-12 07:18:24 +00:00
slack.deb \
2018-06-12 06:58:12 +00:00
no
}
#
2018-06-12 07:18:24 +00:00
# Slack (Menu)
2018-06-12 06:58:12 +00:00
#
2018-06-12 07:18:24 +00:00
function installSlackMenu () {
installPackageDpkg https://downloads.slack-edge.com/linux_releases/slack-desktop-4.3.2-amd64.deb \
2018-06-12 07:18:24 +00:00
slack.deb \
2018-06-12 06:58:12 +00:00
yes
}
2020-07-31 16:44:38 +00:00
#
# XnViewMP (headless)
#
function installXnViewMP () {
installPackageDpkg https://download.xnview.com/XnViewMP-linux-x64.deb \
xnviewmp.deb \
no
}
#
# XnViewMP (Menu)
#
function installXnViewMPMenu () {
installPackageDpkg https://download.xnview.com/XnViewMP-linux-x64.deb \
xnviewmp.deb \
yes
}
2017-12-30 22:08:45 +00:00
#
# update AMD/Intel CPU Microcode
#
function updateMicrocode () {
2018-05-17 07:08:20 +00:00
msg "CPU Microcode updating"
2018-06-05 08:11:13 +00:00
oldMicrocode=`cat /proc/cpuinfo | grep -i --color microcode -m 1 | awk -F': ' '{print $2}'`
2017-12-30 22:08:45 +00:00
intel=`cat /proc/cpuinfo | grep -i Intel | wc -l`
amd=`cat /proc/cpuinfo | grep -i Amd | wc -l`
if [ "$intel" -gt "0" ]; then
installPackage apt intel-microcode
2018-06-05 08:11:13 +00:00
newMicrocode=`cat /proc/cpuinfo | grep -i --color microcode -m 1 | awk -F': ' '{print $2}'`
2018-05-26 23:41:44 +00:00
printf "[INFO] Microcode updated from "$oldMicrocode" version to "$newMicrocode" version"
2017-12-30 22:08:45 +00:00
elif [ "$amd" -gt "0" ]; then
installPackage apt amd64-microcode
2018-06-05 08:11:13 +00:00
newMicrocode=`cat /proc/cpuinfo | grep -i --color microcode -m 1 | awk -F': ' '{print $2}'`
2018-05-17 07:08:20 +00:00
printf "[INFO] Microcode updated from "$oldMicrocode" version to "$newMicrocode" version"
2018-05-26 18:28:26 +00:00
else
2018-05-17 07:08:20 +00:00
printf "[INFO] No Intel/AMD CPU found"
2017-12-30 22:08:45 +00:00
fi
2018-03-20 03:20:15 +00:00
printf "\n"
2017-12-30 22:08:45 +00:00
}
2018-06-05 08:05:04 +00:00
#
# Key-ID USB Fido U2F device udev rules
#
2017-12-30 22:08:45 +00:00
function installKeyIDuDev () {
2018-06-05 08:05:04 +00:00
printf "[CMD] Adding Key-ID device UDEV rules "
cat << EOF | sudo tee /etc/udev/rules.d/70-u2f.rules
# this udev file should be used with udev 188 and newer\n\
ACTION!="add|change", GOTO="u2f_end"
# Key-ID FIDO U2F
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="096e", ATTRS{idProduct}=="0850|0880", TAG+="uaccess"
LABEL="u2f_end"
EOF
ret_code=$?
retCode $ret_code
2017-12-30 22:08:45 +00:00
2018-03-20 03:20:15 +00:00
runCmd "sudo service udev restart" \
"restarting UDEV service"
2017-12-30 22:08:45 +00:00
}
#
# install Teamviewer 13 (headless)
#
function installTeamViewer13 () {
installPackageDpkg https://download.teamviewer.com/download/linux/teamviewer_amd64.deb \
2018-05-03 23:15:38 +00:00
teamviewer13.deb \
no
2017-12-30 22:08:45 +00:00
}
#
# install Teamviewer 13 (Menu)
#
function installTeamViewer13Menu () {
installPackageDpkg https://download.teamviewer.com/download/linux/teamviewer_amd64.deb \
2018-05-03 23:15:38 +00:00
teamviewer13.deb \
yes
}
2018-06-12 07:14:11 +00:00
#
# install Compass (headless)
#
function installCompass () {
installPackageDpkg https://downloads.mongodb.com/compass/mongodb-compass_1.20.5_amd64.deb \
2018-06-12 07:14:11 +00:00
compass.deb \
no
}
#
# install Compass (Menu)
#
function installCompassMenu () {
installPackageDpkg https://downloads.mongodb.com/compass/mongodb-compass_1.20.5_amd64.deb \
2018-06-12 07:14:11 +00:00
compass.deb \
yes
}
2018-06-12 07:18:24 +00:00
#
# Boostnotes (headless)
#
function installBoostnotes () {
installPackageDpkg https://github.com/BoostIO/boost-releases/releases/download/v0.14.0/boostnote_0.14.0_amd64.deb \
2018-06-12 07:18:24 +00:00
boostnotes.deb \
no
}
#
# Boostnotes (Menu)
#
function installBoostnotesMenu () {
installPackageDpkg https://github.com/BoostIO/boost-releases/releases/download/v0.14.0/boostnote_0.14.0_amd64.deb \
2018-06-12 07:18:24 +00:00
boostnotes.deb \
yes
}
#
# Vagrant (headless)
#
function installVagrant () {
installPackageDpkg https://releases.hashicorp.com/vagrant/2.2.7/vagrant_2.2.7_x86_64.deb \
vagrant.deb \
no
}
#
# Vagrant (Menu)
#
function installVagrantMenu () {
installPackageDpkg https://releases.hashicorp.com/vagrant/2.2.7/vagrant_2.2.7_x86_64.deb \
vagrant.deb \
yes
}
#
# AppImage Launcher (headless)
#
function installAppImageLauncher () {
installPackageDpkg https://github.com/TheAssassin/AppImageLauncher/releases/download/v2.1.1/appimagelauncher_2.1.1-travis931.f6d5926.bionic_amd64.deb \
appimagelauncher.deb \
no
}
#
# AppImage Launcher (Menu)
#
function installAppImageLauncherMenu () {
installPackageDpkg https://github.com/TheAssassin/AppImageLauncher/releases/download/v2.1.1/appimagelauncher_2.1.1-travis931.f6d5926.bionic_amd64.deb \
appimagelauncher.deb \
yes
}