update command to run gemnut. evidently i've coded it to have to run
from its own directory. must go back and fix this later.
This commit is contained in:
parent
bf705bea3d
commit
e2d63ba089
|
@ -1,29 +1,30 @@
|
||||||
#!/usr/bin/env fish
|
#!/usr/bin/env fish
|
||||||
|
|
||||||
|
# save current working directory
|
||||||
|
set cwd (pwd)
|
||||||
|
|
||||||
# List remote's new and modified files
|
# List remote's new and modified files
|
||||||
echo "Updating gemlog from remote repo" \n
|
echo "Updating gemlog from remote repo" \n
|
||||||
cd ~/public_gemini
|
cd ~/public_gemini
|
||||||
git fetch
|
git fetch
|
||||||
# save them in fish array $changed
|
# save them in fish array $changed
|
||||||
set changed (git diff --name -status main origin/main | cut -f2)
|
set changed (git diff --name-status main origin/main | cut -f2)
|
||||||
echo "New or changed files: $changed" \n
|
echo "New or changed files: $changed" \n
|
||||||
# Pull from tildegit repo holding my gemlog content
|
# Pull from tildegit repo holding my gemlog content
|
||||||
git pull
|
git pull
|
||||||
|
|
||||||
# Convert gmi to html
|
# Convert gmi to html
|
||||||
echo "Converting gemlog to html"
|
echo "Converting gemlog to html"
|
||||||
|
cd ~/code/geminut
|
||||||
node ~/code/geminut ~/public_gemini/index.gmi ~/public_html/index.html
|
|
||||||
|
|
||||||
|
|
||||||
# Converting all new and converted gmi files -> html files
|
# Converting all new and converted gmi files -> html files
|
||||||
for i in $changed
|
for i in $changed
|
||||||
echo "converting $i"
|
echo "converting $i"
|
||||||
set file (basename $i .gmi)
|
set file (basename $i .gmi)
|
||||||
node ~/code/geminut $i ~/public_html/$file.html
|
node geminut $i ~/public_html/$file.html
|
||||||
end
|
end
|
||||||
|
|
||||||
# Change back to previous directory
|
# Change back to original directory
|
||||||
cd -
|
cd $cwd
|
||||||
|
|
||||||
echo "Completed"
|
echo "Completed"
|
||||||
|
|
Loading…
Reference in New Issue