Browse Source

Update mfpub

Scott Lahteine 5 years ago
parent
commit
055cb2b956
1 changed files with 19 additions and 1 deletions
  1. 19
    1
      buildroot/share/git/mfpub

+ 19
- 1
buildroot/share/git/mfpub View File

115
 git checkout gh-pages || { echo "Something went wrong!"; exit 1; }
115
 git checkout gh-pages || { echo "Something went wrong!"; exit 1; }
116
 rsync -av ${TMPFOLDER}/ ./
116
 rsync -av ${TMPFOLDER}/ ./
117
 
117
 
118
+opensite() {
119
+  TOOL=$(which gnome-open xdg-open open | awk '{ print $1 }')
120
+  URL="http://marlinfw.org/"
121
+  if [ -z "$TOOL" ]; then
122
+    echo "Can't find a tool to open the URL:"
123
+    echo $URL
124
+  else
125
+    echo "Opening the site in the browser..."
126
+    "$TOOL" "$URL"
127
+  fi
128
+}
129
+
118
 # Commit and push the new live site directly
130
 # Commit and push the new live site directly
119
 git add --all
131
 git add --all
120
 git commit --message "Built from ${COMMIT}"
132
 git commit --message "Built from ${COMMIT}"
121
-git push upstream
133
+git push upstream | {
134
+  while IFS= read -r line
135
+  do
136
+    [[ $line =~ "gh-pages -> gh-pages" ]] && opensite
137
+    echo "$line"
138
+  done
139
+}
122
 
140
 
123
 # remove the temporary folder
141
 # remove the temporary folder
124
 rm -rf ${TMPFOLDER}
142
 rm -rf ${TMPFOLDER}

Loading…
Cancel
Save