diff options
author | Jacob Janzen <jacob.a.s.janzen@gmail.com> | 2024-11-08 16:41:38 -0600 |
---|---|---|
committer | Jacob Janzen <jacob.a.s.janzen@gmail.com> | 2024-11-08 16:41:38 -0600 |
commit | 075aaf2a39c6c35d67f0b9863c2834713b5b9ee9 (patch) | |
tree | 427b63c53c7eff9994f33628b6aee5388c82b0e9 | |
parent | 54e5ee6fdf2cb6914b40dcc90f87eaeff306866b (diff) |
this should fix it
-rw-r--r-- | deploy.sh | 28 | ||||
-rwxr-xr-x | fix-dotfile-paths.sh | 2 |
2 files changed, 29 insertions, 1 deletions
diff --git a/deploy.sh b/deploy.sh new file mode 100644 index 0000000..1e15d57 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +if [ "$1" = "dev" ]; then + branch=dev + location='/var/www/html-test' +elif [ "$1" = "prod" ]; then + branch=main + location='/var/www/html' +fi + +cd ~/website || exit +git checkout "$branch" +git pull + +cd ~/.dotfiles || exit +git checkout "$branch" +git pull + +cd ~/blog || exit +git checkout "$branch" +git pull + +cd ~/.dotfiles || exit +~/website/fix-dotfile-paths.sh +emacs --batch -f package-initialize --script ~/website/publish.el +~/website/post-publish.sh + +cp -r public_html/* "$location" diff --git a/fix-dotfile-paths.sh b/fix-dotfile-paths.sh index e17980a..1e0826c 100755 --- a/fix-dotfile-paths.sh +++ b/fix-dotfile-paths.sh @@ -50,7 +50,7 @@ create_dir_tree () { cd ~/.dotfiles || exit git checkout main -echo '#+title: Dotfiles' >> index.org +echo '#+title: Dotfiles' > index.org echo 'This is my system configuration. These pages are automatically generated from the sources hosted [[https://git.sr.ht/~jjanzen/.dotfiles][here]]. Choose which system to browse: ' >> index.org find -- . -maxdepth 1 -type d | sed '/\(^\.$\|^\.\/\.git$\|\.\/common\)/d' | while read -r root; do echo creating root $root |