feat: add second url to open argument to script

master
Kebler Network System Administrator 2021-09-16 14:24:33 -07:00
parent 21c9940d4d
commit ade5236b01
1 changed files with 2 additions and 1 deletions

View File

@ -9,6 +9,7 @@ local exe="/usr/bin/chromium"
[[ ! $exe ]] && echo chromium not installed set && return 1 [[ ! $exe ]] && echo chromium not installed set && return 1
user=${CHROMIUM_USER} user=${CHROMIUM_USER}
[[ $1 && ( ! $1 == -* ) ]] && user=$1 && shift [[ $1 && ( ! $1 == -* ) ]] && user=$1 && shift
[[ $1 && ( ! $1 == -* ) ]] && url=$1 && shift
user=${user:-$USER} user=${user:-$USER}
if [[ $user == "$USER" ]]; then if [[ $user == "$USER" ]]; then
unset CHROME_CONFIG_HOME unset CHROME_CONFIG_HOME
@ -19,7 +20,7 @@ if [[ $user == "$USER" ]]; then
[[ $user == "incognito" ]] && set -- "$@" "-incognito" [[ $user == "incognito" ]] && set -- "$@" "-incognito"
dir=${CHROMIUM_HOME:-$DEFAULT} dir=${CHROMIUM_HOME:-$DEFAULT}
echo "$exe $@ --user-data-dir=$dir/$user" echo "$exe $@ --user-data-dir=$dir/$user"
"$exe" "$@" --user-data-dir="$dir"/"$user" "$exe" "$@" --user-data-dir="$dir"/"$user" $url
fi fi
} }