update run script
This commit is contained in:
@@ -9,7 +9,7 @@ services:
|
|||||||
user: 1000:1000
|
user: 1000:1000
|
||||||
volumes:
|
volumes:
|
||||||
- ~/S/japanese/manga:/mokuro/manga
|
- ~/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
|
runtime: nvidia
|
||||||
restart: no
|
restart: no
|
||||||
network_mode: host
|
network_mode: host
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env sh
|
||||||
# Usage: ./zip.sh [directory]
|
|
||||||
# Default is current directory
|
|
||||||
set -Eeuo pipefail
|
set -Eeuo pipefail
|
||||||
|
|
||||||
DIR="${1:-.}"
|
DIR="${1:-.}"
|
||||||
|
|
||||||
|
mokuro --parent_dir "$DIR" --disable_confirmation
|
||||||
|
|
||||||
cd "$DIR" || exit
|
cd "$DIR" || exit
|
||||||
|
|
||||||
for f in *.mokuro; do
|
for f in *.mokuro; do
|
||||||
@@ -12,7 +12,7 @@ for f in *.mokuro; do
|
|||||||
base="${f%.mokuro}"
|
base="${f%.mokuro}"
|
||||||
dir="$base"
|
dir="$base"
|
||||||
zipfile="$base.zip"
|
zipfile="$base.zip"
|
||||||
if [[ -f "$zipfile" ]]; then
|
if [ -f "$zipfile" ]; then
|
||||||
echo "Warning: Zip file $zipfile already exists, skipping."
|
echo "Warning: Zip file $zipfile already exists, skipping."
|
||||||
elif [ -d "$dir" ]; then
|
elif [ -d "$dir" ]; then
|
||||||
echo "Zipping: $zipfile <- $f $dir/"
|
echo "Zipping: $zipfile <- $f $dir/"
|
||||||
Reference in New Issue
Block a user