more logging
This commit is contained in:
parent
666cd6aad2
commit
3390496eb6
2 changed files with 10 additions and 4 deletions
|
@ -3,9 +3,14 @@
|
||||||
if [ "$1" = "test" ]; then
|
if [ "$1" = "test" ]; then
|
||||||
branch='test'
|
branch='test'
|
||||||
location='/var/www/html-test'
|
location='/var/www/html-test'
|
||||||
|
echo 'deploying to test.jjanzen.ca'
|
||||||
elif [ "$1" = "prod" ]; then
|
elif [ "$1" = "prod" ]; then
|
||||||
branch='main'
|
branch='main'
|
||||||
location='/var/www/html'
|
location='/var/www/html'
|
||||||
|
echo 'deploying to jjanzen.ca'
|
||||||
|
else
|
||||||
|
echo 'unrecognized mode'
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf "$HOME/public_html"
|
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"
|
/bin/cp -r "$HOME/public_html"/* "$location"
|
||||||
chown -R apache:apache "$location"
|
chown -R apache:apache "$location"
|
||||||
|
chmod -R 775 "$location"
|
||||||
|
|
|
@ -16,9 +16,9 @@ create_ls_entry () {
|
||||||
if [ "$files" != '' ]; then
|
if [ "$files" != '' ]; then
|
||||||
echo '* Files' >> index.org
|
echo '* Files' >> index.org
|
||||||
echo "$files" | sort | while read -r file; do
|
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/')
|
tmp=$(echo "$file" | sed 's/^\.//' | sed 's/.org$/.hidden.org/')
|
||||||
mv $file $tmp
|
mv "$file" "$tmp"
|
||||||
fi
|
fi
|
||||||
if [ "$file" = ".wallpaper" ]; then
|
if [ "$file" = ".wallpaper" ]; then
|
||||||
echo "- [[https://wallhaven.cc/w/vgryy5][=.wallpaper=]]" >> index.org
|
echo "- [[https://wallhaven.cc/w/vgryy5][=.wallpaper=]]" >> index.org
|
||||||
|
@ -53,9 +53,9 @@ 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
|
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
|
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/\(\.\/\|\/$\)//')
|
root=$(echo "$root" | sed 's/\(\.\/\|\/$\)//')
|
||||||
echo root after cleanup: $root
|
echo root after cleanup: "$root"
|
||||||
echo "- [[https://jjanzen.ca/dotfiles/${root}][${root}]]" >> index.org
|
echo "- [[https://jjanzen.ca/dotfiles/${root}][${root}]]" >> index.org
|
||||||
cd "$root" || exit
|
cd "$root" || exit
|
||||||
create_dir_tree "$root"
|
create_dir_tree "$root"
|
||||||
|
|
Loading…
Add table
Reference in a new issue