Split Console Install Menu

This commit is contained in:
MatMoul 2016-04-09 02:26:54 +02:00
parent f9df68f152
commit 1aabc6637d
7 changed files with 159 additions and 43 deletions

38
install/console/basic Normal file
View file

@ -0,0 +1,38 @@
#!/bin/bash
. ./lib
options=()
options+=("bash-completion" "Best completion in bash" on)
options+=("lsof" "ls open file" on)
options+=("dmidecode" "Hardware infos" on)
options+=("nmon" "System monitor" on)
options+=("mc" "Dual pane file explorer" off)
options+=("powertop" "power mon and management" off)
options+=("dialog" "Dialog boxes for script" off)
options+=("gpm" "Console mouse support" off)
sel=$(whiptail --backtitle "$apptitle" --title "Console Basic packages :" --checklist "Choose what you want" --cancel-button "Back" 0 0 0 \
"${options[@]}" \
3>&1 1>&2 2>&3)
if [ ! "$?" = "0" ]; then
exit 1
fi
for itm in $sel; do
case $itm in
*) pkg="$pkg $(echo $itm | sed 's/"//g')";;
esac
done
instpkg "$pkg" "$aurpkg"
for itm in $sel; do
case $itm in
'"gpm"')
svcstart gpm
svcenable gpm
;;
esac
done
exit 0

View file

@ -0,0 +1,25 @@
#!/bin/bash
. ./lib
options=()
options+=("zip" "ZIP files" on)
options+=("unzip" "ZIP files" on)
options+=("unrar" "RAR files" on)
options+=("p7zip" "File Archiver" on)
sel=$(whiptail --backtitle "$apptitle" --title "Console Compression Tools :" --checklist "" --cancel-button "Back" 0 0 0 \
"${options[@]}" \
3>&1 1>&2 2>&3)
if [ ! "$?" = "0" ]; then
exit 1
fi
for itm in $sel; do
case $itm in
*) pkg="$pkg $(echo $itm | sed 's/"//g')";;
esac
done
instpkg "$pkg" "$aurpkg"
exit 0

View file

@ -2,54 +2,27 @@
. ./lib
options=()
options+=("bash-completion" "Best completion in bash" on)
options+=("lsof" "ls open file" on)
options+=("dmidecode" "Hardware infos" on)
options+=("nmon" "System monitor" on)
options+=("rsync" "Sync files" on)
options+=("zip" "ZIP files" on)
options+=("unzip" "ZIP files" on)
options+=("unrar" "RAR files" on)
options+=("p7zip" "File Archiver" on)
options+=("traceroute" "Trace network route" on)
options+=("bind-tools" "DNS tools (nslookup)" on)
options+=("dnsutils" "DNS tools (nslookup)" off)
options+=("nmap" "Network scanner" off)
options+=("mc" "Dual pane file explorer" off)
options+=("links" "Web browser" off)
options+=("powertop" "power mon and management" off)
#options+=("gpm" "Console mouse support" off)
options+=("wavemon" "WIFI monitor" off)
options+=("speedtest-cli" "SpeedTest" off)
options+=("net-tools" "(deprecated) old ifconfig" off)
options+=("dialog" "Dialog boxes for script" off)
options+=("ddrescue" "HD recovery tool" off)
options+=("dd_rescue" "HD recovery tool" off)
options+=("partclone" "Copy used block on partition" off)
options+=("Basic" "")
options+=("Compression Tools" "")
options+=("Network Tools" "")
options+=("Webbrowser" "")
options+=("Recovery Tools" "")
sel=$(whiptail --backtitle "$apptitle" --title "Console applications :" --checklist "" --cancel-button "Back" 0 0 0 \
defaultitem=""
sel=$(whiptail --backtitle "$apptitle" --title "Install Menu :" --menu "" --default-item "$defaultitem" --cancel-button "Back" 0 0 0 \
"${options[@]}" \
3>&1 1>&2 2>&3)
if [ ! "$?" = "0" ]; then
exit 1
fi
sed -i "/^defaultitem=/c\defaultitem=\"$sel\"" $0
for itm in $sel; do
case $itm in
*) pkg="$pkg $(echo $itm | sed 's/"//g')";;
esac
done
instpkg "$pkg" "$aurpkg"
for itm in $sel; do
case $itm in
'"gpm"')
svcstart gpm
svcenable gpm
;;
esac
done
case $sel in
"Basic") script install/console/basic;;
"Compression Tools") script install/console/compression-tools;;
"Network Tools") script install/console/network-tools;;
"Webbrowser") script install/console/webbrowser;;
"Recovery Tools") script install/console/recovery-tools;;
esac
exit 0

View file

@ -0,0 +1,32 @@
#!/bin/bash
. ./lib
options=()
options+=("rsync" "Sync files" on)
options+=("traceroute" "Trace network route" on)
options+=("bind-tools" "DNS tools (nslookup)" on)
options+=("dnsutils" "DNS tools (nslookup)" off)
options+=("nmap" "Network scanner" off)
options+=("speedtest-cli" "SpeedTest" off)
options+=("wavemon" "WIFI monitor" off)
options+=("net-tools" "(deprecated) old ifconfig" off)
options+=("dsniff" "tools for network auditing and penetration" off)
options+=("mitmproxy" "SSL-capable MITM HTTP proxy" off)
options+=("sslstrip" "tool to hijack HTTPS in MITM attack" off)
sel=$(whiptail --backtitle "$apptitle" --title "Console Network Tools :" --checklist "Choose what you want" --cancel-button "Back" 0 0 0 \
"${options[@]}" \
3>&1 1>&2 2>&3)
if [ ! "$?" = "0" ]; then
exit 1
fi
for itm in $sel; do
case $itm in
*) pkg="$pkg $(echo $itm | sed 's/"//g')";;
esac
done
instpkg "$pkg" "$aurpkg"
exit 0

View file

@ -0,0 +1,24 @@
#!/bin/bash
. ./lib
options=()
options+=("ddrescue" "HD recovery tool" off)
options+=("dd_rescue" "HD recovery tool" off)
options+=("partclone" "Copy used block on partition" off)
sel=$(whiptail --backtitle "$apptitle" --title "Console Recovery Tools :" --checklist "" --cancel-button "Back" 0 0 0 \
"${options[@]}" \
3>&1 1>&2 2>&3)
if [ ! "$?" = "0" ]; then
exit 1
fi
for itm in $sel; do
case $itm in
*) pkg="$pkg $(echo $itm | sed 's/"//g')";;
esac
done
instpkg "$pkg" "$aurpkg"
exit 0

View file

@ -0,0 +1,24 @@
#!/bin/bash
. ./lib
options=()
options+=("elinks" "" off)
options+=("links" "" off)
options+=("lynx" "" off)
sel=$(whiptail --backtitle "$apptitle" --title "Console Web Browser :" --checklist "Choose what you want" --cancel-button "Back" 0 0 0 \
"${options[@]}" \
3>&1 1>&2 2>&3)
if [ ! "$?" = "0" ]; then
exit 1
fi
for itm in $sel; do
case $itm in
*) pkg="$pkg $(echo $itm | sed 's/"//g')";;
esac
done
instpkg "$pkg" "$aurpkg"
exit 0

View file

@ -19,7 +19,7 @@ fi
sed -i "/^defaultitem=/c\defaultitem=\"$sel\"" $0
case $sel in
"Console") script install/console/menu;;
"Console") menu install/console/menu;;
"System") menu install/system/menu;;
"XOrg") menu install/xorg/menu;;
"Display Manager") menu install/displaymngr/menu;;