aboutsummaryrefslogtreecommitdiff
path: root/fix-dotfile-paths.sh
diff options
context:
space:
mode:
Diffstat (limited to 'fix-dotfile-paths.sh')
-rwxr-xr-xfix-dotfile-paths.sh8
1 files changed, 4 insertions, 4 deletions
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"