This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Useful options for https://github.com/SolarNetwork/solarnetwork-dev | |
# Examples of ubuntu desktop packages that can be used. | |
desktop_packages='virtualbox-guest-dkms virtualbox-guest-additions-iso lubuntu-desktop chromium-browser' | |
# desktop_packages='virtualbox-guest-dkms virtualbox-guest-additions-iso lubuntu-desktop' | |
# desktop_packages='virtualbox-guest-dkms virtualbox-guest-additions-iso xubuntu-desktop --no-install-recommends' | |
# desktop_packages='virtualbox-guest-dkms virtualbox-guest-additions-iso ubuntu-mate-core' | |
# Budgie blocks on the postfix configuration during a vagrant so should be used, can installed and used after the VM has provisioned however. | |
# desktop_packages='virtualbox-guest-dkms virtualbox-guest-additions-iso budgie-desktop-minimal' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install SolarNetwork code templates and formatting rules | |
setProperty(){ | |
# expects: property name, value, file path | |
if grep -q "^$1=" "$3"; then | |
# Update the existing property | |
awk -v pat="^$1=" -v value="`echo "$1=$2" | sed -e 's/\\=/\\\\=/g' -e 's/\\n/\\\\n/g'`" '{ if ($0 ~ pat) print value; else print $0; }' $3 > $3.tmp | |
mv $3.tmp $3 | |
else | |
# Append as a new property | |
printf "$1=$2\n" >> $3 |