aboutsummaryrefslogtreecommitdiff
path: root/chromium-profile
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-02-04 15:39:39 -0200
committerSilvio Rhatto <rhatto@riseup.net>2018-02-04 15:39:39 -0200
commit1f67415dc270483ca10656842fa9ad6c25e8a0d1 (patch)
tree46bed084913f48d431c724a45698ba8a7d3c2b37 /chromium-profile
parentaff2ee88e17a4ec984f5ce1b9311e060b8bb4eec (diff)
downloadutils-x11-1f67415dc270483ca10656842fa9ad6c25e8a0d1.tar.gz
utils-x11-1f67415dc270483ca10656842fa9ad6c25e8a0d1.tar.bz2
Copy default profile if available, or start a new one at chromium-profile
Diffstat (limited to 'chromium-profile')
-rwxr-xr-xchromium-profile9
1 files changed, 8 insertions, 1 deletions
diff --git a/chromium-profile b/chromium-profile
index 07c7428..ff2d832 100755
--- a/chromium-profile
+++ b/chromium-profile
@@ -13,7 +13,14 @@ fi
if which chromium 2> /dev/null; then
BASE="$HOME/.config/chromium-profiles"
PROFILE="$BASE/$1"
- mkdir -p "$PROFILE"
+
+ # Copy default profile if available, or start a new one
+ if [ ! -d "$PROFILE" ] && [ -d "$BASE/default" ]; then
+ cp -a "$BASE/default" "$PROFILE"
+ else
+ mkdir -p "$PROFILE"
+ fi
+
shift
CHROMIUM_FLAGS="$CHROMIUM_FLAGS --site-per-process --enable-remote-extensions" chromium --user-data-dir="$PROFILE" $*