Browse Source

Update mfpub

pull/1/head
Scott Lahteine 6 years ago
parent
commit
055cb2b956
  1. 20
      buildroot/share/git/mfpub

20
buildroot/share/git/mfpub

@ -115,10 +115,28 @@ git clean -d -f
git checkout gh-pages || { echo "Something went wrong!"; exit 1; } git checkout gh-pages || { echo "Something went wrong!"; exit 1; }
rsync -av ${TMPFOLDER}/ ./ 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 # Commit and push the new live site directly
git add --all git add --all
git commit --message "Built from ${COMMIT}" 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 # remove the temporary folder
rm -rf ${TMPFOLDER} rm -rf ${TMPFOLDER}

Loading…
Cancel
Save