update command
This commit is contained in:
25
run.sh
25
run.sh
@@ -1,25 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
set -Eeuo pipefail
|
||||
|
||||
DIR="${1:-.}"
|
||||
|
||||
mokuro --parent_dir "$DIR" --disable_confirmation
|
||||
|
||||
cd "$DIR" || exit
|
||||
|
||||
for f in *.mokuro; do
|
||||
[ -e "$f" ] || continue # skip if no .mokuro files
|
||||
base="${f%.mokuro}"
|
||||
dir="$base"
|
||||
zipfile="$base.zip"
|
||||
if [ -f "$zipfile" ]; then
|
||||
echo "Warning: Zip file $zipfile already exists, skipping."
|
||||
elif [ -d "$dir" ]; then
|
||||
echo "Zipping: $zipfile <- $f $dir/"
|
||||
zip -qr "$zipfile" "$f" "$dir"
|
||||
else
|
||||
echo "Warning: Directory '$dir' not found for '$f', skipping."
|
||||
fi
|
||||
done
|
||||
|
||||
rm -rf ./*.html
|
||||
Reference in New Issue
Block a user