You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

40 lines
1.1 KiB

#!/bin/bash
set -e # exit on error
set -o pipefail # exit on pipeline error
set -u # treat unset variable as error
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
# install packages
if [ $DISTRIBUTION = "stretch" ]; then
$APT_CMD update >>$OUTPUT 2>&1 &&
$APT_CMD install $APT_OPTIONS chromium
elif [ -f $SCRIPT_DIR/$PACKAGE_VARIANT.list ]; then
$APT_CMD update >>$OUTPUT 2>&1 &&
$APT_CMD install $APT_OPTIONS \
$(grep -vE "^\s*#" $SCRIPT_DIR/$PACKAGE_VARIANT.list | tr "\n" " ") >>$OUTPUT 2>&1
fi
if [ ! -d /etc/chromium.d/ ]; then
mkdir /etc/chromium.d
fi
echo 'export CHROMIUM_FLAGS="$CHROMIUM_FLAGS --disk-cache-dir=/dev/null --disk-cache-size=1"' >>/etc/chromium.d/default-flags
if [ $DESKTOP_ENVIRONMENT = "xfce" ]; then
if [ $PACKAGE_VARIANT = "minimal" ]; then
cat <<EOF >/etc/skel/.config/xfce4/helpers.rc
TerminalEmulator=xterm
FileManager=pcmanfm
WebBrowser=chromium
EOF
elif [ $PACKAGE_VARIANT = "standard" ]; then
cat <<EOF >/etc/skel/.config/xfce4/helpers.rc
TerminalEmulator=xfce4-terminal
FileManager=Thunar
WebBrowser=chromium
EOF
fi
fi