Better archbox-desktop script.
This commit is contained in:
parent
fffc5a43cc
commit
a34af6374c
@ -12,6 +12,15 @@ install_desktop(){
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
checkdep(){
|
||||||
|
which $1 >/dev/null 2>&1 || err "Install $1!"
|
||||||
|
}
|
||||||
|
|
||||||
|
err(){
|
||||||
|
echo "$(tput bold)$(tput setaf 1)==> $@ $(tput sgr0)"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
help_text(){
|
help_text(){
|
||||||
cat << EOF
|
cat << EOF
|
||||||
USAGE: $0 <arguments>
|
USAGE: $0 <arguments>
|
||||||
@ -30,7 +39,11 @@ case $1 in
|
|||||||
-h|--help)
|
-h|--help)
|
||||||
help_text
|
help_text
|
||||||
;;
|
;;
|
||||||
|
-*)
|
||||||
|
err "Unknown option: $1"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
|
checkdep zenity
|
||||||
list_desktop="$(archbox ls --color=none -1 /usr/share/applications)"
|
list_desktop="$(archbox ls --color=none -1 /usr/share/applications)"
|
||||||
zenity_entry="$(echo $list_desktop | sed 's/\ /\ FALSE\ /g')"
|
zenity_entry="$(echo $list_desktop | sed 's/\ /\ FALSE\ /g')"
|
||||||
selected_entry=$(zenity --list --checklist --height=500 --width=450 \
|
selected_entry=$(zenity --list --checklist --height=500 --width=450 \
|
||||||
|
@ -52,7 +52,7 @@ case $1 in
|
|||||||
checkdep wget
|
checkdep wget
|
||||||
while true; do wget -O archlinux.tar.gz $2 && break; done
|
while true; do wget -O archlinux.tar.gz $2 && break; done
|
||||||
msg "Extracting the tarball..."
|
msg "Extracting the tarball..."
|
||||||
checkdep tar
|
checkdep tar
|
||||||
tar xzf archlinux.tar.gz
|
tar xzf archlinux.tar.gz
|
||||||
msg "Enabling internet connection in chroot enviroment..."
|
msg "Enabling internet connection in chroot enviroment..."
|
||||||
cp /etc/resolv.conf $CHROOT/etc/resolv.conf
|
cp /etc/resolv.conf $CHROOT/etc/resolv.conf
|
||||||
|
Loading…
Reference in New Issue
Block a user