mirror of
https://github.com/arkenfox/user.js.git
synced 2025-05-21 16:17:11 +02:00
updater.sh: -l auto select if only one profile
This commit is contained in:
parent
3b70fab06d
commit
bbbb6f05d2
1 changed files with 21 additions and 14 deletions
|
@ -58,12 +58,19 @@ set_wd () {
|
||||||
echo -e ${RED}"Error: Sorry, -l is not supported for your OS"${NC}
|
echo -e ${RED}"Error: Sorry, -l is not supported for your OS"${NC}
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
numdirs=("$firefox_dir"/*)
|
||||||
|
numdirs=${#numdirs[@]}
|
||||||
|
if [[ $numdirs == "1" ]]; then
|
||||||
|
ff_profile=$(ls -d "$firefox_dir"*)
|
||||||
|
else
|
||||||
|
echo "wrong"
|
||||||
echo -e ${GREEN}"The following profiles were found:\n"${ORANGE}
|
echo -e ${GREEN}"The following profiles were found:\n"${ORANGE}
|
||||||
ls -d "$firefox_dir"*
|
ls -d "$firefox_dir"*
|
||||||
echo -e ${RED}"\nWhich profile would you like to update?"${NC}
|
echo -e ${RED}"\nWhich profile would you like to update?"${NC}
|
||||||
read -p ""
|
read -p ""
|
||||||
echo -e ""
|
echo -e ""
|
||||||
ff_profile=$REPLY
|
ff_profile=$REPLY
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
ff_profile="$PROFILE_PATH"
|
ff_profile="$PROFILE_PATH"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue