diff --git a/README.md b/README.md index 6c7a54cb..9c4d8e59 100644 --- a/README.md +++ b/README.md @@ -58,23 +58,23 @@ Installation Open your command line and run (needs curl to be installed): -``` -bash <(curl -s https://raw.githubusercontent.com/markus-perl/ffmpeg-build-script/master/web-install.sh?v1) +```bash +bash <(curl -s "https://raw.githubusercontent.com/markus-perl/ffmpeg-build-script/master/web-install.sh?v1") ``` This command downloads the build script and automatically starts the build process. ### Common installation -``` +```bash git clone https://github.com/markus-perl/ffmpeg-build-script.git cd ffmpeg-build-script -./ffmpeg-build-script --help +./build-ffmpeg --help ``` Usage ------ -``` +```bash ./build-ffmpeg --help Display usage information ./build-ffmpeg --build Starts the build process ./build-ffmpeg --cleanup Remove all working dirs diff --git a/build-ffmpeg b/build-ffmpeg index fabc01b9..dfbf00c9 100755 --- a/build-ffmpeg +++ b/build-ffmpeg @@ -384,7 +384,13 @@ echo "Building done. The binary can be found here: $WORKSPACE/bin/ffmpeg" echo "" -if [[ ! $SKIPINSTALL == "yes" ]]; then +if [[ $AUTOINSTALL == "yes" ]]; then + if command_exists "sudo"; then + sudo cp "$WORKSPACE/bin/ffmpeg" "$INSTALL_FOLDER/ffmpeg" + sudo cp "$WORKSPACE/bin/ffprobe" "$INSTALL_FOLDER/ffprobe" + echo "Done. ffmpeg is now installed to your system" + fi +elif [[ ! $SKIPINSTALL == "yes" ]]; then if command_exists "sudo"; then read -r -p "Install the binary to your $INSTALL_FOLDER folder? [Y/n] " response