From 4e015546ea389028da8791175a9328995f8fa0fd Mon Sep 17 00:00:00 2001 From: David Kebler Date: Tue, 7 Mar 2023 10:48:55 -0800 Subject: [PATCH] Update chromium.inst link chromium script to /opt/bin instead of copying it to host --- apps/chromium/chromium.inst | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/apps/chromium/chromium.inst b/apps/chromium/chromium.inst index f234cca..94f8d19 100755 --- a/apps/chromium/chromium.inst +++ b/apps/chromium/chromium.inst @@ -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