Update chromium.inst link chromium script to /opt/bin instead of copying it to host

master
David Kebler 2023-03-07 10:48:55 -08:00
parent 842eee2b5a
commit 4e015546ea
1 changed files with 6 additions and 11 deletions

View File

@ -1,24 +1,19 @@
#!/bin/bash #!/bin/bash
function chromium_install { function chromium_install {
BASH_SHELL_HOST=${BASH_SHELL_HOST:-$(dirname $BASH_SHELL_BASE)/$(hostname)}
mkdir -p $BASH_SHELL_HOST/apps
local src
local target local target
local dir="$(dirname $(realpath "${BASH_SOURCE:-$0}"))" local dir="$(dirname $(realpath "${BASH_SOURCE:-$0}"))"
local script=$dir/chromium.func local script=$dir/chromium.func
# todo call distro specific install # todo call distro specific install
[[ ! -f $script ]] && echo can not find script chromium function $script && return 2 [[ ! -f $script ]] && echo can not find script chromium function at $script && return 2
src=$BASH_SHELL_HOST/apps/chromium
echo installing chromium script to $src
cp $script $src
target=${1:-/opt/bin}/chromium target=${1:-/opt/bin}/chromium
chmod +rx $src chmod +rx $script
ln -sf $src $target ln -sf $script $target
echo link to $src created at $target echo link to $script created at $target
ls -la /opt/bin | grep chromium ls -la /opt/bin | grep chromium
echo with permissions echo with permissions
ls -la $src ls -la $script
} }
# if script was executed then call the function # if script was executed then call the function