shell-host/install/apps/chromium/chromium.inst

26 lines
809 B
Bash
Executable File

#!/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
target=${1:-/opt/bin}/chromium
chmod +rx $src
ln -sf $src $target
echo link to $src created at $target
ls -la /opt/bin | grep chromium
echo with permissions
ls -la $src
}
# if script was executed then call the function
(return 0 2>/dev/null) || chromium_install $@