aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Janzen <jacob.a.s.janzen@gmail.com>2024-12-29 11:15:04 -0600
committerJacob Janzen <jacob.a.s.janzen@gmail.com>2024-12-29 11:15:04 -0600
commit3390496eb673564d2e61f36a66745d6c1ed7110a (patch)
tree0f8cdce2c0b11f160894468c153c9fbcf7020129
parent666cd6aad23d7d765f9840d647b02f50f19af314 (diff)
more logging
-rwxr-xr-xdeploy.sh6
-rwxr-xr-xfix-dotfile-paths.sh8
2 files changed, 10 insertions, 4 deletions
diff --git a/deploy.sh b/deploy.sh
index 4999025..4538d63 100755
--- a/deploy.sh
+++ b/deploy.sh
@@ -3,9 +3,14 @@
if [ "$1" = "test" ]; then
branch='test'
location='/var/www/html-test'
+ echo 'deploying to test.jjanzen.ca'
elif [ "$1" = "prod" ]; then
branch='main'
location='/var/www/html'
+ echo 'deploying to jjanzen.ca'
+else
+ echo 'unrecognized mode'
+ exit 1
fi
rm -rf "$HOME/public_html"
@@ -32,3 +37,4 @@ emacs --batch -f package-initialize --script ~/website/publish.el
/bin/cp -r "$HOME/public_html"/* "$location"
chown -R apache:apache "$location"
+chmod -R 775 "$location"
diff --git a/fix-dotfile-paths.sh b/fix-dotfile-paths.sh
index 0757a5c..f687060 100755
--- a/fix-dotfile-paths.sh
+++ b/fix-dotfile-paths.sh
@@ -16,9 +16,9 @@ create_ls_entry () {
if [ "$files" != '' ]; then
echo '* Files' >> index.org
echo "$files" | sort | while read -r file; do
- if echo $file | grep -q '^\.'; then
+ if echo "$file" | grep -q '^\.'; then
tmp=$(echo "$file" | sed 's/^\.//' | sed 's/.org$/.hidden.org/')
- mv $file $tmp
+ mv "$file" "$tmp"
fi
if [ "$file" = ".wallpaper" ]; then
echo "- [[https://wallhaven.cc/w/vgryy5][=.wallpaper=]]" >> index.org
@@ -53,9 +53,9 @@ git checkout main
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
+ echo creating root "$root"
root=$(echo "$root" | sed 's/\(\.\/\|\/$\)//')
- echo root after cleanup: $root
+ echo root after cleanup: "$root"
echo "- [[https://jjanzen.ca/dotfiles/${root}][${root}]]" >> index.org
cd "$root" || exit
create_dir_tree "$root"