]> gitweb.fluxo.info Git - utils-x11.git/commitdiff
Copy default profile if available, or start a new one at chromium-profile
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 4 Feb 2018 17:39:39 +0000 (15:39 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 4 Feb 2018 17:39:39 +0000 (15:39 -0200)
chromium-profile

index 07c7428fdc6da24fe2a36ae8f0aa524264b713d9..ff2d832157f10d02e6a733a9baa3a35338b07739 100755 (executable)
@@ -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" $*