From 383af5a61e2b955b85b173e8cd853af1bfd4e061 Mon Sep 17 00:00:00 2001 From: sudacode Date: Sun, 7 Sep 2025 04:24:29 -0700 Subject: [PATCH] update run script --- compose.yaml | 2 +- zip.sh => run.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) rename zip.sh => run.sh (80%) diff --git a/compose.yaml b/compose.yaml index 2f9ff46..0e321a3 100644 --- a/compose.yaml +++ b/compose.yaml @@ -9,7 +9,7 @@ services: user: 1000:1000 volumes: - ~/S/japanese/manga:/mokuro/manga - command: mokuro --parent_dir "manga/One Piece Color" --disable_confirmation && ./zip.sh "manga/One Piece Color" + command: ./run.sh "manga/One Piece Color" runtime: nvidia restart: no network_mode: host diff --git a/zip.sh b/run.sh similarity index 80% rename from zip.sh rename to run.sh index e224aa8..0d49c26 100755 --- a/zip.sh +++ b/run.sh @@ -1,10 +1,10 @@ -#!/usr/bin/env bash -# Usage: ./zip.sh [directory] -# Default is current directory +#!/usr/bin/env sh set -Eeuo pipefail DIR="${1:-.}" +mokuro --parent_dir "$DIR" --disable_confirmation + cd "$DIR" || exit for f in *.mokuro; do @@ -12,7 +12,7 @@ for f in *.mokuro; do base="${f%.mokuro}" dir="$base" zipfile="$base.zip" - if [[ -f "$zipfile" ]]; then + if [ -f "$zipfile" ]; then echo "Warning: Zip file $zipfile already exists, skipping." elif [ -d "$dir" ]; then echo "Zipping: $zipfile <- $f $dir/"