From 055cb2b9563d02a6df709a803026242dfc1ea603 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 5 Dec 2018 18:56:52 -0600 Subject: [PATCH] Update mfpub --- buildroot/share/git/mfpub | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/buildroot/share/git/mfpub b/buildroot/share/git/mfpub index 200602506c..1295513339 100755 --- a/buildroot/share/git/mfpub +++ b/buildroot/share/git/mfpub @@ -115,10 +115,28 @@ git clean -d -f git checkout gh-pages || { echo "Something went wrong!"; exit 1; } rsync -av ${TMPFOLDER}/ ./ +opensite() { + TOOL=$(which gnome-open xdg-open open | awk '{ print $1 }') + URL="http://marlinfw.org/" + if [ -z "$TOOL" ]; then + echo "Can't find a tool to open the URL:" + echo $URL + else + echo "Opening the site in the browser..." + "$TOOL" "$URL" + fi +} + # Commit and push the new live site directly git add --all git commit --message "Built from ${COMMIT}" -git push upstream +git push upstream | { + while IFS= read -r line + do + [[ $line =~ "gh-pages -> gh-pages" ]] && opensite + echo "$line" + done +} # remove the temporary folder rm -rf ${TMPFOLDER}