Browse Source

Add test scripts

master
Gennady Koshkin 1 year ago
parent
commit
a7341363dc
  1. 22
      tests/user_flags_new.sh
  2. 16
      tests/user_flags_old.sh

22
tests/user_flags_new.sh

@ -0,0 +1,22 @@
#!/usr/bin/env bash
# Load user flags
if [ -n "$XDG_CONFIG_HOME" ]; then
USER_FLAGS_LOCATION="$XDG_CONFIG_HOME/chromium-flags.conf"
elif [ -n "$HOME" ]; then
USER_FLAGS_LOCATION="$HOME/.config/chromium-flags.conf"
fi
echo "loc: $USER_FLAGS_LOCATION"
if [ -f $USER_FLAGS_LOCATION ]; then
while read -r line; do
case "$line" in
--*)
CHROMIUM_DISTRO_FLAGS+="$line "
;;
esac
done < "$USER_FLAGS_LOCATION"
fi
echo "flags: $CHROMIUM_DISTRO_FLAGS"

16
tests/user_flags_old.sh

@ -0,0 +1,16 @@
#!/usr/bin/env bash
# Load user flags
if [ -n "$XDG_CONFIG_HOME" ]; then
USER_FLAGS_LOCATION="$XDG_CONFIG_HOME/chromium-flags.conf"
elif [ -n "$HOME" ]; then
USER_FLAGS_LOCATION="$HOME/.config/chromium-flags.conf"
fi
echo "loc: $USER_FLAGS_LOCATION"
if [ -f $USER_FLAGS_LOCATION ]; then
CHROMIUM_DISTRO_FLAGS+=`cat $USER_FLAGS_LOCATION`
fi
echo "flags: $CHROMIUM_DISTRO_FLAGS"
Loading…
Cancel
Save