This commit is contained in:
Santiago Lo Coco 2022-01-06 22:57:37 -03:00
parent f594db2601
commit 43fcb210ca
1 changed files with 5 additions and 9 deletions

View File

@ -124,7 +124,7 @@ partDisks() {
} }
getSize() { getSize() {
sizeStr=$(whiptail --inputbox "Enter the size of the ${1} (in GB)." 0 0 3>&1 1>&2 2>&3) sizeStr=$(whiptail --inputbox "Enter the size of the ${1} (in GB, for example 1.5GB)." 0 0 3>&1 1>&2 2>&3)
exitIfCancel "You must enter a size." exitIfCancel "You must enter a size."
size=$(echo "$sizeStr" | grep -Eo '[-]?[0-9]+([.,]?[0-9]+)?' | head -n1 | sed 's/,/./g' | awk '{ print int($1 * 1024) }') size=$(echo "$sizeStr" | grep -Eo '[-]?[0-9]+([.,]?[0-9]+)?' | head -n1 | sed 's/,/./g' | awk '{ print int($1 * 1024) }')
while [ $(echo $size | awk '{ print $1 <= 0 }') -eq 1 ]; do while [ $(echo $size | awk '{ print $1 <= 0 }') -eq 1 ]; do
@ -333,7 +333,7 @@ calcWidthAndRun() {
fi fi
commOutput=$(eval $comm) commOutput=$(eval $comm)
exitStatus=$? exitStatus=$?
[ ! -z $commOutput ] && echo $commOutput [ -n $commOutput ] && echo $commOutput
return $exitStatus return $exitStatus
} }
@ -351,7 +351,7 @@ calcHeightAndRun() {
fi fi
commOutput=$(eval $comm) commOutput=$(eval $comm)
exitStatus=$? exitStatus=$?
[ ! -z $commOutput ] && echo $commOutput [ -n $commOutput ] && echo $commOutput
return $exitStatus return $exitStatus
} }
@ -476,12 +476,6 @@ finishInstallation() {
fi fi
} }
zshConfig() {
# TODO: Choose between zsh-theme-powerlevel10k-git (AUR) and zsh-theme-powerlevel10k (community)
mkdir -p $HOME/.cache/zsh
touch $HOME/.cache/zsh/.histfile
}
getDotfiles() { getDotfiles() {
zshConfig zshConfig
local lastFolder=$(pwd -P) local lastFolder=$(pwd -P)
@ -492,6 +486,8 @@ getDotfiles() {
cd $lastFolder cd $lastFolder
sudo rm -f ~/.bashrc /usr/bin/CocoASAIS sudo rm -f ~/.bashrc /usr/bin/CocoASAIS
mkdir -p $HOME/.cache/zsh
touch $HOME/.cache/zsh/.histfile
chsh -s $(which zsh) chsh -s $(which zsh)
} }