From 1f67415dc270483ca10656842fa9ad6c25e8a0d1 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 4 Feb 2018 15:39:39 -0200 Subject: Copy default profile if available, or start a new one at chromium-profile --- chromium-profile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'chromium-profile') 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" $* -- cgit v1.2.3