Skip to content

Commit

Permalink
Added new check for apt instead of apt-get
Browse files Browse the repository at this point in the history
  • Loading branch information
G2-Games committed Sep 19, 2022
1 parent b5060b4 commit f4477e8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ then
line=${line%:*}
sed -i "${line}d" $zshrc
fi
# End older version check #

tput rc el ed
echo -e "\e[36mUninstalled! \e[0m"
Expand Down
15 changes: 12 additions & 3 deletions welcome.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,21 @@ version=0.2.5
#========Welcome=======#
welcome () {
msg="Welcome" # Default

if command -v whoami &>/dev/null ; then
usr=$(whoami)
elif command -v id &>/dev/null; then
usr=$(id -u -n)
else
usr=$USER
fi

if [ "$randgreeting" = "on" ]; then
msg=${greetings[$(($RANDOM % $(echo ${#greetings[@]})))]}
fi

# Print the welcome message
echo -en "$msg, ${USRC}${BOLD}$USER${NCOL}. "
echo -en "$msg, ${USRC}${BOLD}$usr${NCOL}. "
}

#=========Time=========#
Expand Down Expand Up @@ -45,7 +54,7 @@ greeting () {
echo -en "$greet ${MORN}morning${NCOL}. "
elif [ $hour -eq 12 ]; then
echo -en "It's ${AFTN}noon${NCOL}. "
elif [ $hour -le 16 ] && [ $hour -gt 12 ]; then
elif [ $hour -le 17 ] && [ $hour -gt 12 ]; then
echo -en "$greet ${AFTN}afternoon${NCOL}. "
elif [ $hour -le 19 ] && [ $hour -gt 17 ]; then
echo -en "$greet ${EVEN}evening${NCOL}. "
Expand Down Expand Up @@ -98,7 +107,7 @@ updates () {
# Check for updates from different places... wonder if there's a better way

# Check for APT
if command -v apt &> /dev/null; then
if command -v apt-get &> /dev/null; then
debian=$(apt-get -s dist-upgrade -V 2> /dev/null | grep '=>' | awk '{print$1}' | wc -l)
fi

Expand Down

0 comments on commit f4477e8

Please sign in to comment.