aboutsummaryrefslogtreecommitdiff
path: root/chromium-profile
diff options
context:
space:
mode:
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