1st commit addind Ubuntu 20.04 support (0.6.0-b1)

This commit is contained in:
Francois B. (Makoto) 2020-05-22 23:16:33 +02:00
parent 1bfb9581e5
commit d73f99a2a9
5 changed files with 1977 additions and 4 deletions

3
.gitignore vendored
View file

@ -5,6 +5,3 @@ deb/*
*.sync-conflict-*
utils/*
TODO.txt
repo_functions_ub2004.sh
menus_functions_ub2004.sh
install_functions_ub2004.sh

236
install_functions_ub2004.sh Normal file
View file

@ -0,0 +1,236 @@
#-----------------------------------------------------------------------------#
# Yggdrasil NG #
# compatibility : see documentation or man pages #
# author : Francois B. (Makotosan/Shakasan) #
# licence : GPLv3 #
# website : https://makotonoblog.be/ #
#-----------------------------------------------------------------------------#
#-----------------------------------------------------------------------------#
# #
# Ubuntu 20.04 / Linux Mint 20 #
# #
#-----------------------------------------------------------------------------#
#-----------------------------------------------------------------------------#
# install functions #
#-----------------------------------------------------------------------------#
#
# Viber (headless)
#
function installViber () {
installPackageDpkg http://download.cdn.viber.com/cdn/desktop/Linux/viber.deb \
viber.deb \
no
}
#
# Viber (Menu)
#
function installViberMenu () {
installPackageDpkg http://download.cdn.viber.com/cdn/desktop/Linux/viber.deb \
viber.deb \
yes
}
#
# Franz (headless)
#
function installFranz () {
installPackageDpkg https://github.com/meetfranz/franz/releases/download/v5.4.0/franz_5.4.0_amd64.deb \
franz.deb \
no
}
#
# Franz (Menu)
#
function installFranzMenu () {
installPackageDpkg https://github.com/meetfranz/franz/releases/download/v5.4.0/franz_5.4.0_amd64.deb \
franz.deb \
yes
}
#
# Slack (headless)
#
function installSlack () {
installPackageDpkg https://downloads.slack-edge.com/linux_releases/slack-desktop-4.4.2-amd64.deb \
slack.deb \
no
}
#
# Slack (Menu)
#
function installSlackMenu () {
installPackageDpkg https://downloads.slack-edge.com/linux_releases/slack-desktop-4.4.2-amd64.deb \
slack.deb \
yes
}
#
# 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
}
#
# update AMD/Intel CPU Microcode
#
function updateMicrocode () {
msg "CPU Microcode updating"
oldMicrocode=`cat /proc/cpuinfo | grep -i --color microcode -m 1 | awk -F': ' '{print $2}'`
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
newMicrocode=`cat /proc/cpuinfo | grep -i --color microcode -m 1 | awk -F': ' '{print $2}'`
printf "[INFO] Microcode updated from "$oldMicrocode" version to "$newMicrocode" version"
elif [ "$amd" -gt "0" ]; then
installPackage apt amd64-microcode
newMicrocode=`cat /proc/cpuinfo | grep -i --color microcode -m 1 | awk -F': ' '{print $2}'`
printf "[INFO] Microcode updated from "$oldMicrocode" version to "$newMicrocode" version"
else
printf "[INFO] No Intel/AMD CPU found"
fi
printf "\n"
}
#
# fix some config issue with Intel Wireless 6320 cards
#
function fixWirelessIntel6320 () {
runCmd "sudo cp /etc/modprobe.d/iwlwifi.conf /etc/modprobe.d/iwlwifi.conf.bak" \
"backing up config file"
runCmd "echo options iwlwifi bt_coex_active=0 swcrypto=1 11n_disable=8 | sudo tee /etc/modprobe.d/iwlwifi.conf" \
"applying new config"
printf "[INFO] reboot required !!!"
printf "\n"
}
#
# Key-ID USB Fido U2F device udev rules
#
function installKeyIDuDev () {
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
runCmd "sudo service udev restart" \
"restarting UDEV service"
}
#
# install Teamviewer 13 (headless)
#
function installTeamViewer13 () {
installPackageDpkg https://download.teamviewer.com/download/linux/teamviewer_amd64.deb \
teamviewer13.deb \
no
}
#
# install Teamviewer 13 (Menu)
#
function installTeamViewer13Menu () {
installPackageDpkg https://download.teamviewer.com/download/linux/teamviewer_amd64.deb \
teamviewer13.deb \
yes
}
#
# install Compass (headless)
#
function installCompass () {
installPackageDpkg https://downloads.mongodb.com/compass/mongodb-compass_1.20.5_amd64.deb \
compass.deb \
no
}
#
# install Compass (Menu)
#
function installCompassMenu () {
installPackageDpkg https://downloads.mongodb.com/compass/mongodb-compass_1.20.5_amd64.deb \
compass.deb \
yes
}
#
# Boostnotes (headless)
#
function installBoostnotes () {
installPackageDpkg https://github.com/BoostIO/BoostNote.next/releases/download/v0.4.1/boost-note-linux.deb \
boostnotes.deb \
no
}
#
# Boostnotes (Menu)
#
function installBoostnotesMenu () {
installPackageDpkg https://github.com/BoostIO/BoostNote.next/releases/download/v0.4.1/boost-note-linux.deb \
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.3/appimagelauncher_2.1.3-travis975.7408819.bionic_amd64.deb \
appimagelauncher.deb \
no
}
#
# AppImage Launcher (Menu)
#
function installAppImageLauncherMenu () {
installPackageDpkg https://github.com/TheAssassin/AppImageLauncher/releases/download/v2.1.3/appimagelauncher_2.1.3-travis975.7408819.bionic_amd64.deb \
appimagelauncher.deb \
yes
}

486
menus_functions_ub2004.sh Normal file
View file

@ -0,0 +1,486 @@
#-----------------------------------------------------------------------------#
# Yggdrasil NG #
# compatibility : see documentation or man pages #
# author : Francois B. (Makotosan/Shakasan) #
# licence : GPLv3 #
# website : https://makotonoblog.be/ #
#-----------------------------------------------------------------------------#
#-----------------------------------------------------------------------------#
# #
# Ubuntu 20.04 / Linux Mint 20 #
# #
#-----------------------------------------------------------------------------#
#-----------------------------------------------------------------------------#
# menus functions #
#-----------------------------------------------------------------------------#
#
# show about dialog box
#
function showAboutBoxMenu () {
whiptail \
--title "About" \
--msgbox "\n
Author : Francois B. (Makotosan)
Email : shakasan@sirenacorp.be
Website : https://makotonoblog.be/
Github : https://github.com/shakasan/yggdrasil_ng
Licence : GPLv3
Version : $version\n
At the beginning, this script has been written to makes my life easier when I have to (re)install my personal computers ;-)
Advices and remarks are welcome ^^" \
20 80
}
#
# show reboot menu
#
function showRebootBoxMenu () {
if (whiptail \
--title "Yggdrasil $version - WARNING - ReBoot" \
--yesno "Are you sure to reboot this computer ?" \
7 42) then
sudo reboot
fi
}
#
# show menu to config system
#
function showConfigMenu () {
while true; do
configMenuOptions=$(whiptail \
--title "Yggdrasil $version - System Config" \
--menu "System Config" \
25 80 16 \
"Ufw" "Enable Firewall (ufw)" \
"NumLockX" "NumLock Enabled at boot time" \
"TmpRAM" "/tmp stored in RAM" \
"screenfetch" "screenfetch added to .bashrc" \
"historyTS" "TimeStamp enabled in Shell History" \
"unattendedUpgrades" "Enable automatic security updates" \
"Unbound" "Enable Unbound DNS Cache server" \
"Back" "Back" 3>&1 1>&2 2>&3)
case $configMenuOptions in
"Ufw")
clear
enableUFW
pressKey
;;
"NumLockX")
clear
enableNumLockX
pressKey
;;
"TmpRAM")
clear
enableTmpRAM
pressKey
;;
"screenfetch")
clear
addScreenfetchBashrc
pressKey
;;
"historyTS")
clear
enableHistoryTS
pressKey
;;
"unattendedUpgrades")
clear
installUnattendedUpgrades
pressKey
;;
"Unbound")
clear
installAppsFromList unbound
pressKey
;;
"Back")
break
;;
esac
done
}
#
# show menu to install system tools
#
function showSysToolsMenu () {
while true; do
sysToolsMenuOptions=$(whiptail \
--title "Yggdrasil $version - System Tools" \
--menu "System tools to diagnose and optimize" \
25 80 16 \
"inxi" "System informations" \
"speedtest-cli" "Bandwidth test" \
"packetloss" "Packetloss test (ping)" \
"OptimizeFirefox" "Firefox SQLite databases optimization" \
"Autoremove" "Remove useless Deb packages" \
"CleanOldKernels" "Removing old kernels (keep 2 last kernels)" \
"SoundCardsDetection" "Sound Cards Detection" \
"Back" "Back" 3>&1 1>&2 2>&3)
case $sysToolsMenuOptions in
"inxi")
clear; toolInxi; pressKey
;;
"speedtest-cli")
clear; toolSpeedtestCli; pressKey
;;
"packetloss")
clear; toolPacketLoss; pressKey
;;
"OptimizeFirefox")
clear; toolOptimizeFirefox; pressKey
;;
"Autoremove")
clear; toolAutoremove; pressKey
;;
"CleanOldKernels")
clear; toolClearOldKernels; pressKey
;;
"SoundCardsDetection")
clear; toolSoundCardsDetection; pressKey
;;
"Back")
break
;;
esac
done
}
#
# show menu to install themes/icons
#
function showThemesInstallMenu () {
while true; do
themesInstallMenuOptions=$(whiptail \
--title "Yggdrasil $version - Themes/Icons Install" \
--menu "Install themes/icons from different submenus" \
25 80 16 \
"themes" "GTK themes" \
"icons" "Icons" \
"Back" "Back" 3>&1 1>&2 2>&3)
case $themesInstallMenuOptions in
"themes")
installAppsFromListMenu gtkthemes
;;
"icons")
installAppsFromListMenu icons
;;
"Back")
break
;;
esac
done
}
#
# show menu to install dev apps
#
function showDevInstallMenu () {
while true; do
devInstallMenuOptions=$(whiptail \
--title "Yggdrasil $version - Dev Install" \
--menu "Install Dev apps from different submenus" \
25 80 16 \
"devbase" "dev apps and tools" \
"java11" "OpenJDK Java 11 dev env" \
"javascript" "JavaScript dev env" \
"mongodbce" "MongoDB CE" \
"php" "PHP dev env" \
"lua" "Lua dev env" \
"ruby" "Ruby dev env" \
"qt" "QT dev env" \
"python" "Python dev env" \
"atom" "Atom" \
"anjuta" "Anjuta" \
"brackets" "Brackets" \
"codeblocks" "CodeBlocks" \
"geany" "Geany" \
"idea" "Idea" \
"eclipse" "Eclipse" \
"pycharmprofessional" "PyCharm Professional edition" \
"pycharmcommunity" "PyCharm Community edition" \
"vsc" "Visual Studio Code" \
"androidstudio" "Android Studio" \
"sublimetext" "Sublime Text" \
"cad" "CAD tools" \
"teamviewer13" "Teamviewer 13" \
"boostnotes" "Boostnotes Markdown wiki app" \
"compass" "MongoDB Compass GUI" \
"gitkraken" "Gitkraken git gui" \
"vagrant" "Vagrant" \
"Back" "Back" 3>&1 1>&2 2>&3)
case $devInstallMenuOptions in
"devbase")
installAppsFromListMenu dev
;;
"java11")
installAppsFromListMenu java11
;;
"javascript")
installAppsFromListMenu javascript
;;
"mongodbce")
installAppsFromListMenu mongodb
;;
"php")
installAppsFromListMenu php
;;
"lua")
installAppsFromListMenu lua
;;
"ruby")
installAppsFromListMenu ruby
;;
"qt")
installAppsFromListMenu qt
;;
"python")
installAppsFromListMenu python
;;
"atom")
installAppsFromListMenu atom
;;
"anjuta")
installAppsFromListMenu anjuta
;;
"brackets")
installAppsFromListMenu brackets
;;
"codeblocks")
installAppsFromListMenu codeblocks
;;
"geany")
installAppsFromListMenu geany
;;
"idea")
installAppsFromListMenu idea
;;
"eclipse")
installAppsFromListMenu eclipse
;;
"pycharmprofessional")
installAppsFromListMenu pycharm-professional
;;
"pycharmcommunity")
installAppsFromListMenu pycharm-community
;;
"vsc")
installAppsFromListMenu code
;;
"androidstudio")
installAppsFromListMenu androidstudio
;;
"sublimetext")
installAppsFromListMenu sublime-text
;;
"cad")
installAppsFromListMenu cad
;;
"teamviewer13")
installTeamViewer13Menu
;;
"boostnotes")
installBoostnotesMenu
;;
"compass")
installCompassMenu
;;
"gitkraken")
installAppsFromListMenu gitkraken
;;
"vagrant")
installVagrantMenu
;;
"Back")
break
;;
esac
done
}
#
# show menu to install apps from different categories
#
function showAppInstallMenu () {
while true; do
appsInstallMenuOptions=$(whiptail \
--title "Yggdrasil $version - Apps Install" \
--menu "Install apps from different submenus" \
25 80 16 \
"base" "Base Apps" \
"office" "Office Apps" \
"multimedia" "Multimedia Apps" \
"ebook" "eBook Apps" \
"internet" "Internet Apps" \
"utilities" "Misc Utilities" \
"games" "Games & tools" \
"steam" "Steam" \
"burningtools" "Disc Burning and tools" \
"nettools" "Network tools" \
"cajaplugins" "Caja Plugins" \
"nautilus" "Nautilus and plugins" \
"thunar" "Thunar file manager" \
"gimp" "Gimp plugins" \
"rhythmbox" "RhythmBox plugins" \
"pidgin" "Pidgin plugins" \
"nitrogen" "Nitrogen WP Manager" \
"wine" "Wine Builds" \
"viber" "Viber IM desktop app" \
"franz" "Franz multi IM app" \
"slack" "Slack App" \
"appimagelauncher" "AppImage Launcher" \
"xnviewmp" "XNView MP" \
"Back" "Back" 3>&1 1>&2 2>&3)
case $appsInstallMenuOptions in
"base")
installAppsFromListMenu base
;;
"office")
installAppsFromListMenu office
;;
"multimedia")
installAppsFromListMenu multimedia
;;
"ebook")
installAppsFromListMenu ebook
;;
"internet")
installAppsFromListMenu internet
;;
"utilities")
installAppsFromListMenu utilities
;;
"games")
installAppsFromListMenu games
;;
"steam")
installAppsFromListMenu steam
;;
"burningtools")
installAppsFromListMenu burningtools
;;
"nettools")
installAppsFromListMenu nettools
;;
"cajaplugins")
installAppsFromListMenu cajaplugins
;;
"nautilus")
installAppsFromList nautilus
;;
"thunar")
installAppsFromListMenu thunar
;;
"gimp")
installAppsFromListMenu gimp
;;
"rhythmbox")
installAppsFromListMenu rhythmbox
;;
"pidgin")
installAppsFromListMenu pidgin
;;
"nitrogen")
installAppsFromListMenu nitrogen
;;
"wine")
installAppsFromListMenu wine
;;
"viber")
installViberMenu
;;
"franz")
installFranzMenu
;;
"slack")
installSlackMenu
;;
"appimagelauncher")
installAppImageLauncherMenu
;;
"xnviewmp")
installXnViewMPMenu
;;
"Back")
break
;;
esac
done
}
#
# show menu about install/config hardware
#
function showHardwareMenu () {
while true; do
hardwareMenuOptions=$(whiptail \
--title "Yggdrasil $version - System Tools" \
--menu "System tools to diagnose and optimize" \
25 80 16 \
"HWE" "Ubuntu Hardware Enablement Stack (newer kernel+xorg)" \
"cardreader" "Apps/tools needed for cardreaders" \
"solaar" "Solaar for Logitech Unifying devices" \
"webcam" "Install webcam neede apps" \
"microcode" "Update Intel/AMD CPU microcode" \
"tlp" "Install/Enable TLP for better power management " \
"keyid" "Add udev rules for Key-ID FIDO U2F usb key" \
"WI6320" "Fix Intel Wireless 6320 card config problem" \
"Back" "Back" 3>&1 1>&2 2>&3)
case $hardwareMenuOptions in
"HWE")
installAppsFromListMenu hwe
;;
"cardreader")
installAppsFromListMenu cardreader
;;
"solaar")
installAppsFromListMenu solaar
;;
"webcam")
installAppsFromListMenu webcam
;;
"microcode")
updateMicrocode
pressKey
;;
"tlp")
installAppsFromListMenu tlp
;;
"keyid")
installKeyIDuDev
pressKey
;;
"WI6320")
fixWirelessIntel6320
pressKey
;;
"Back")
break
;;
esac
done
}

1254
repo_functions_ub2004.sh Normal file

File diff suppressed because it is too large Load diff

View file

@ -13,7 +13,7 @@
#
# app version number
#
version="0.5.2-b3"
version="0.6.0-b1"
#
# myHomedir is used in full paths to the homedir