This repository has been archived on 2022-02-20. You can view files and clone it, but cannot push or open issues/pull-requests.
bash-shell-host/all/modules/chromium/chromium-install.sh

21 lines
523 B
Bash
Raw Permalink Normal View History

#!/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 $@