shell-host/modules/chromium/chromium-install.sh

21 lines
523 B
Bash
Executable File

#!/bin/bash
function chromium_install {
source $BASH_SHELL_BASE/module.lib
module_load helpers
NAME="chromium"
DIR=$(adirname "$0")
BIN=${1:-/opt/bin/$NAME}
# [[ $(chown :users $DIR/$NAME.sh) ]] || sudo chown :users $DIR/$NAME.sh
[[ $(chmod 755 $DIR/$NAME.sh) ]] || sudo chmod 755 $DIR/$NAME.sh
ln -sf $DIR/$NAME.sh $BIN
echo link created
ls -la /opt/bin | grep chromium
echo with permissions
ls -la $DIR | grep chromium.sh
}
# if script was executed then call the function
(return 0 2>/dev/null) || chromium_install $@