Compare commits

..

No commits in common. "6eb456e6671d67f2a6306b2f4e8829ea827557c4" and "7768df55a6f21bec5eff20d9448d8b0ef2d1a85d" have entirely different histories.

View File

@ -11,13 +11,6 @@ function print_usage() {
echo "USAGE: ${0##*/} -d <device> -o <dir> [-t <dir>] [-r]" echo "USAGE: ${0##*/} -d <device> -o <dir> [-t <dir>] [-r]"
} }
if [ $# -eq 0 ]
then
>&2 echo "No arguments specified!"
print_usage
exit 1
fi
while getopts "d:o:t:rh" opt while getopts "d:o:t:rh" opt
do do
case "$opt" in case "$opt" in
@ -71,9 +64,8 @@ do
OUTPUT_PATH="$OUTPUT_DIR/${INPUT_FILE##*/}" OUTPUT_PATH="$OUTPUT_DIR/${INPUT_FILE##*/}"
if ! [ -f "$OUTPUT_PATH" ] if ! [ -f "$OUTPUT_PATH" ]
then then
echo "Copying ${INPUT_FILE} to ${OUTPUT_PATH::-4}.jpg ..." echo "Copying ${INPUT_FILE} to ${OUTPUT_PATH} ..."
cp "$INPUT_FILE" "${OUTPUT_PATH::-4}.jpg" cp "$INPUT_FILE" "${OUTPUT_PATH::-4}.jpg"
chmod -x "${OUTPUT_PATH::-4}.jpg"
fi fi
if [ $REMOVE_FILES -eq 1 ] if [ $REMOVE_FILES -eq 1 ]
@ -88,7 +80,7 @@ do
OUTPUT_PATH="$OUTPUT_DIR/${INPUT_FILE##*/}" OUTPUT_PATH="$OUTPUT_DIR/${INPUT_FILE##*/}"
if ! [ -f "$OUTPUT_PATH" ] if ! [ -f "$OUTPUT_PATH" ]
then then
echo "Converting ${INPUT_FILE} to MP4 at ${OUTPUT_PATH::-4}.mp4 ..." echo "Converting ${INPUT_FILE} to MP4 at ${OUTPUT_PATH} ..."
ffmpeg -loglevel fatal -nostdin -i "$INPUT_FILE" "${OUTPUT_PATH::-4}.mp4" ffmpeg -loglevel fatal -nostdin -i "$INPUT_FILE" "${OUTPUT_PATH::-4}.mp4"
fi fi