mirror of https://github.com/ericonr/dotfiles.git
18 lines
253 B
Plaintext
18 lines
253 B
Plaintext
|
#!/bin/sh
|
||
|
# convert .cbr files to .cbz
|
||
|
set -e
|
||
|
bdir="$PWD"
|
||
|
for arg
|
||
|
do
|
||
|
file="$(realpath "$arg")"
|
||
|
[ -z "$file"] && false
|
||
|
dir="$(mktemp -d)"
|
||
|
|
||
|
cd "$dir"
|
||
|
unrar e "$file"
|
||
|
tar acf "$file".zip ./
|
||
|
mv "$file".zip "$file".cbz
|
||
|
cd "$bdir"
|
||
|
rm -rf "$dir"
|
||
|
done
|