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