Use POSIX shell constructs instead
This commit is contained in:
parent
7feb65e8f9
commit
29c7b3e72f
10
fsub
10
fsub
|
@ -12,14 +12,14 @@ usage() {
|
||||||
[ -z "$1" ] && usage
|
[ -z "$1" ] && usage
|
||||||
|
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
|
case "$arg" in
|
||||||
|
*.srt )
|
||||||
if [ ! -f "$arg" ]; then
|
if [ ! -f "$arg" ]; then
|
||||||
echo "$arg is not a file"
|
echo "$arg is not a file"
|
||||||
usage
|
usage
|
||||||
fi
|
fi ;;
|
||||||
if [ "${arg: -4}" != ".srt" ]; then
|
*) echo "$arg is not a .srt file"; usage ;;
|
||||||
echo "$arg is not a .srt file"
|
esac
|
||||||
usage
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
[ -f "$FSUBRC" ] || touch $FSUBRC
|
[ -f "$FSUBRC" ] || touch $FSUBRC
|
||||||
|
|
Loading…
Reference in New Issue