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:
lee2sman 2022-12-03 17:40:49 -05:00
parent bf705bea3d
commit e2d63ba089
1 changed files with 8 additions and 7 deletions

View File

@ -1,29 +1,30 @@
#!/usr/bin/env fish
# save current working directory
set cwd (pwd)
# List remote's new and modified files
echo "Updating gemlog from remote repo" \n
cd ~/public_gemini
git fetch
# 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
# Pull from tildegit repo holding my gemlog content
git pull
# Convert gmi to html
echo "Converting gemlog to html"
node ~/code/geminut ~/public_gemini/index.gmi ~/public_html/index.html
cd ~/code/geminut
# Converting all new and converted gmi files -> html files
for i in $changed
echo "converting $i"
set file (basename $i .gmi)
node ~/code/geminut $i ~/public_html/$file.html
node geminut $i ~/public_html/$file.html
end
# Change back to previous directory
cd -
# Change back to original directory
cd $cwd
echo "Completed"