added option to auto Download dialog package and updated zp-install.run
This commit is contained in:
15
install.sh
15
install.sh
@@ -1,7 +1,14 @@
|
||||
#!/bin/bash
|
||||
if ! hash dialog 2>/dev/null; then
|
||||
echo "dialog is not installed"
|
||||
exit
|
||||
while true; do
|
||||
read -p "install from apt? (y/n) " yn
|
||||
case $yn in
|
||||
[Yy]* ) sudo apt install dialog || echo "dialog install failed"; break;;
|
||||
[Nn]* ) echo "exiting zpower installer"; exit;;
|
||||
* ) echo "please answer Y/n only.";;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
working() {
|
||||
@@ -48,11 +55,11 @@ do
|
||||
esac
|
||||
done
|
||||
|
||||
# Update/upgrade ubuntu repos
|
||||
echo "Updating Ubuntu repos..."
|
||||
# Update/upgrade repos
|
||||
echo "Updating repos..."
|
||||
sudo apt -qq update -y && sudo apt -qq upgrade -y || echo "apt update failed"
|
||||
|
||||
# Install packages from Ubuntu repos
|
||||
# Install packages from repos
|
||||
if [ $zse -eq 1 ]; then
|
||||
sudo apt -qq install -y curl git zsh tmux powerline || echo "apt install failed"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user