Files
runner-images/images/linux/scripts/helpers/document.sh
Sergey Dolin e1fb068300 add Homebrew on Linux (#589)
* Add homebrew installation and validation scripts

* Update `/etc/environment` in `updatepath.sh` script

Keep this code for sake of compatibility with the existing installation logic. It will be changed in its own PR

* Remove env. variables from homebrew validation task

* Move reboot to the dedicated script and task

Co-authored-by: Sergey Dolin <v-sedoli@micorosoft.com>
2020-04-10 12:20:16 +03:00

31 lines
729 B
Bash

#!/bin/bash
################################################################################
## File: document.sh
## Desc: Helper functions for writing information to the metadata document
################################################################################
function WriteItem {
if [ -z "$METADATA_FILE" ]; then
echo "METADATA_FILE environment variable must be set to output to Metadata Document!"
return 1;
else
echo -e "$1" | sudo tee -a "$METADATA_FILE"
fi
}
function AddTitle {
WriteItem "# $1"
}
function AddSubTitle {
WriteItem "## $1"
}
function DocumentInstalledItem {
WriteItem "- $1"
}
function DocumentInstalledItemIndent {
WriteItem " - $1"
}