Initial username can include spaces

This commit is contained in:
Bob Mottram 2016-09-12 11:15:11 +01:00
parent 82f43da167
commit f3ec211ede
No known key found for this signature in database
GPG Key ID: 0452CC7CEA982E38
1 changed files with 2 additions and 5 deletions

View File

@ -638,8 +638,8 @@ function mesh_client_startup_applications {
echo ' exit 0' >> $START_DESKTOP
echo 'fi' >> $START_DESKTOP
echo '' >> $START_DESKTOP
echo 'INITIAL_TOX_USERNAME=' >> $START_DESKTOP
echo 'while [ ! $INITIAL_TOX_USERNAME ]; do' >> $START_DESKTOP
echo 'INITIAL_TOX_USERNAME=""' >> $START_DESKTOP
echo 'while [ ${#INITIAL_TOX_USERNAME} -eq 0 ]; do' >> $START_DESKTOP
echo ' data=$(tempfile 2>/dev/null)' >> $START_DESKTOP
echo ' trap "rm -f $data" 0 1 2 5 15' >> $START_DESKTOP
echo -n " dialog --title \"${MESH_TITLE}\" " >> $START_DESKTOP
@ -650,9 +650,6 @@ function mesh_client_startup_applications {
echo ' case $sel in' >> $START_DESKTOP
echo ' 0)' >> $START_DESKTOP
echo ' INITIAL_TOX_USERNAME=$(<$data)' >> $START_DESKTOP
echo ' if [ ${#INITIAL_TOX_USERNAME} -lt 1 ]; then' >> $START_DESKTOP
echo ' INITIAL_TOX_USERNAME=' >> $START_DESKTOP
echo ' fi' >> $START_DESKTOP
echo ' ;;' >> $START_DESKTOP
echo ' esac' >> $START_DESKTOP
echo 'done' >> $START_DESKTOP