diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2018-02-04 15:53:14 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2018-02-04 15:53:14 -0200 |
commit | 670989af519ff9845f95551b98e52c87c3999697 (patch) | |
tree | e7068d870823dc5f92e3c4ba9a9ef849915fb51f /chromium-profile | |
parent | 1f67415dc270483ca10656842fa9ad6c25e8a0d1 (diff) | |
download | utils-x11-670989af519ff9845f95551b98e52c87c3999697.tar.gz utils-x11-670989af519ff9845f95551b98e52c87c3999697.tar.bz2 |
Display available profiles at chromium-profile
Diffstat (limited to 'chromium-profile')
-rwxr-xr-x | chromium-profile | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/chromium-profile b/chromium-profile index ff2d832..8a634d9 100755 --- a/chromium-profile +++ b/chromium-profile @@ -4,14 +4,30 @@ # https://www.chromium.org/developers/creating-and-using-profiles # https://www.chromium.org/Home/chromium-security/site-isolation +# Parameters +BASENAME="`basename $0`" +BASE="$HOME/.config/chromium-profiles" + # Check if [ -z "$1" ]; then - cat $0 + # Autoprint as usage + #cat $0 + + if [ -d "$BASE" ]; then + PROFILES="`ls $BASE | xargs`" + fi + + echo "usage: $BASENAME <profile>" + + if [ ! -z "$PROFILES" ]; then + echo "available profiles:" + echo "\t $(ls $BASE | xargs)" + fi + exit 1 fi if which chromium 2> /dev/null; then - BASE="$HOME/.config/chromium-profiles" PROFILE="$BASE/$1" # Copy default profile if available, or start a new one |