gui: fix terminal title when installing 2-3 apps

pull/651/head
Botspot 3 years ago
parent edc867ba7e
commit 7de90b3b30

12
gui

@ -120,13 +120,14 @@ runonce "
source "${DIRECTORY}/api"
install() {
app="$1"
app="$1" #one app name per line
#terminal title text
linecount="$(echo "$app" | wc -l)"
if [ $linecount -eq 1 ];then
title="Installing $app"
elif [ $linecount -le 4 ];then
title="Installing $(echo "$app" | tr '\n' '|' | sed -i 's/|/, /g')"
elif [ $linecount -lt 4 ];then
title="Installing $(echo -n "$app" | tr '\n' '|' | sed 's/|/, /g')"
else
title="Installing several apps"
fi
@ -147,13 +148,14 @@ install() {
}
uninstall() {
app="$1"
app="$1" #one app name per line
#terminal title text
linecount="$(echo "$app" | wc -l)"
if [ $linecount -eq 1 ];then
title="Uninstalling $app"
elif [ $linecount -le 4 ];then
title="Uninstalling $(echo "$app" | tr '\n' '|' | sed -i 's/|/, /g')"
title="Uninstalling $(echo -n "$app" | tr '\n' '|' | sed 's/|/, /g')"
else
title="Uninstalling several apps"
fi

Loading…
Cancel
Save