Update chromium.inst link chromium script to /opt/bin instead of copying it to host
parent
842eee2b5a
commit
4e015546ea
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue