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