aboutsummaryrefslogtreecommitdiff
path: root/chromium-profile
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-02-04 15:53:14 -0200
committerSilvio Rhatto <rhatto@riseup.net>2018-02-04 15:53:14 -0200
commit670989af519ff9845f95551b98e52c87c3999697 (patch)
treee7068d870823dc5f92e3c4ba9a9ef849915fb51f /chromium-profile
parent1f67415dc270483ca10656842fa9ad6c25e8a0d1 (diff)
downloadutils-x11-670989af519ff9845f95551b98e52c87c3999697.tar.gz
utils-x11-670989af519ff9845f95551b98e52c87c3999697.tar.bz2
Display available profiles at chromium-profile
Diffstat (limited to 'chromium-profile')
-rwxr-xr-xchromium-profile20
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