Skip to content

Commit e865b5e

Browse files
committed
add --skip-install and --auto-install options
1 parent fcbcb3c commit e865b5e

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

build-ffmpeg

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,9 @@ usage() {
237237
echo " --small Prioritize small size over speed and usability; don't build manpages"
238238
echo " --full-static Build a full static FFmpeg binary (eg. glibc, pthreads etc...) **only Linux**"
239239
echo " Note: Because of the NSS (Name Service Switch), glibc does not recommend static links."
240+
echo " --skip-install Don't install FFmpeg, FFprobe, and FFplay binaries to your system"
241+
echo " --auto-install Install FFmpeg, FFprobe, and FFplay binaries to your system"
242+
echo " Note: Without --skip-install or --auto-install the script will prompt you to install."
240243
echo ""
241244
}
242245

@@ -286,6 +289,20 @@ while (($# > 0)); do
286289
CONFIGURE_OPTIONS+=("--enable-small" "--disable-doc")
287290
MANPAGES=0
288291
fi
292+
if [[ "$1" == "--skip-install" ]]; then
293+
SKIPINSTALL=yes
294+
if [[ "$AUTOINSTALL" == "yes" ]]; then
295+
echo "Error: The option --skip-install cannot be used with --auto-install"
296+
exit 1
297+
fi
298+
fi
299+
if [[ "$1" == "--auto-install" ]]; then
300+
AUTOINSTALL=yes
301+
if [[ "$SKIPINSTALL" == "yes" ]]; then
302+
echo "Error: The option --auto-install cannot be used with --skip-install"
303+
exit 1
304+
fi
305+
fi
289306
shift
290307
;;
291308
*)

0 commit comments

Comments
 (0)