aboutsummaryrefslogtreecommitdiff
path: root/send-refresh.sh
diff options
context:
space:
mode:
Diffstat (limited to 'send-refresh.sh')
-rwxr-xr-xsend-refresh.sh27
1 files changed, 10 insertions, 17 deletions
diff --git a/send-refresh.sh b/send-refresh.sh
index 3df4a51..20d9f12 100755
--- a/send-refresh.sh
+++ b/send-refresh.sh
@@ -19,18 +19,18 @@ echo " --- Young files ---"
for file in "${young_files[@]}"; do
filename=$(basename "$file")
checksum=$(md5sum "$file" | awk '{print $1;}')
- filesite=$webdir$checksum
+ filesite="$webdir$checksum"
if mkdir "$filesite" ; then
echo "Made directory, and it worked!"
- webpage=$filesite/index.html
- cat html/1.part >> $webpage
- echo \<h2\>\<a href="$filename"\>$filename\</a\>\</h2\> >> $webpage
- cat html/2.part >> $webpage
- stat $file >> $webpage
- zipinfo -1 $file | tree --fromfile . >> $webpage
- cat html/3.part >> $webpage
+ webpage="$filesite/index.html"
+ cat html/1.part >> "$webpage"
+ echo \<h2\>\<a href="$filename"\>$filename\</a\>\</h2\> >> "$webpage"
+ cat html/2.part >> "$webpage"
+ stat "$file" >> "$webpage"
+ zipinfo -1 "$file" | tree --fromfile . >> "$webpage"
+ cat html/3.part >> "$webpage"
mv "$file" "$filesite/$filename"
@@ -45,15 +45,8 @@ for file in "${young_files[@]}"; do
done
-echo "\n --- Old files ---"
+echo " --- Old files ---"
for file in "${old_files[@]}"; do
- filename=$(basename "$file")
- checksum=$(md5sum "$file" | awk '{print $1;}')
-
echo "file: $file"
- echo "filename: $filename"
- echo "checksum: $checksum"
-
- rm -rf $(dirname "$file")
-
+ rm -rf "$(dirname "$file")"
done