Skip to content

Commit f821e2c

Browse files
committed
MacOS sed fixes
1 parent 4d9b6ec commit f821e2c

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ Building done. The binary can be found here: /Users/me/dev/ffmpeg-build-script/w
596596
597597
Install the binary to your /usr/local/bin folder? [Y/n] y
598598
Password:
599-
Done. ffmpeg is now installed to your system
599+
Done. ffmpeg is now installed to your system.
600600
```
601601

602602

build-ffmpeg

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ if build "x265"; then
290290
execute cmake -DCMAKE_INSTALL_PREFIX:PATH="${WORKSPACE}" -DENABLE_SHARED:bool=off -DSTATIC_LINK_CRT:BOOL=ON -DENABLE_CLI:BOOL=OFF .
291291
execute make -j $MJOBS
292292
execute make install
293-
sed -i 's/-lgcc_s/-lgcc_eh/g' "$WORKSPACE/lib/pkgconfig/x265.pc"
293+
sed -i '' 's/-lgcc_s/-lgcc_eh/g' "$WORKSPACE/lib/pkgconfig/x265.pc" #The -i '' is intended and required on MacOS: https://unix.stackexchange.com/questions/112023/how-can-i-replace-a-string-in-a-files/112024#112024
294294
build_done "x265"
295295
fi
296296
CONFIGURE_OPTIONS+=("--enable-libx265")
@@ -460,7 +460,7 @@ if build "srt"; then
460460
export OPENSSL_INCLUDE_DIR="${WORKSPACE}"/include/
461461
execute cmake . -DCMAKE_INSTALL_PREFIX:PATH="${WORKSPACE}" -DENABLE_SHARED=OFF -DENABLE_STATIC=ON -DENABLE_APPS=OFF -DUSE_STATIC_LIBSTDCXX=ON
462462
execute make install
463-
sed -i 's/-lgcc_s/-lgcc_eh/g' "$WORKSPACE/lib/pkgconfig/srt.pc"
463+
sed -i '' 's/-lgcc_s/-lgcc_eh/g' "$WORKSPACE/lib/pkgconfig/srt.pc" #The -i '' is intended and required on MacOS: https://unix.stackexchange.com/questions/112023/how-can-i-replace-a-string-in-a-files/112024#112024
464464

465465
build_done "srt"
466466
fi
@@ -473,7 +473,7 @@ CONFIGURE_OPTIONS+=("--enable-libsrt")
473473
if command -v nvcc > /dev/null ; then
474474
if build "nv-codec"; then
475475
download "https://github.com/FFmpeg/nv-codec-headers/releases/download/n10.0.26.0/nv-codec-headers-10.0.26.0.tar.gz"
476-
sed -i "s#PREFIX = /usr/local#PREFIX = ${WORKSPACE}#g" Makefile
476+
sed -i '' "s#PREFIX = /usr/local#PREFIX = ${WORKSPACE}#g" Makefile #The -i '' is intended and required on MacOS: https://unix.stackexchange.com/questions/112023/how-can-i-replace-a-string-in-a-files/112024#112024
477477
execute make install
478478
build_done "nv-codec"
479479
fi
@@ -528,16 +528,15 @@ echo ""
528528
echo "Building done. The binary can be found here: $WORKSPACE/bin/ffmpeg"
529529
echo ""
530530

531-
532531
if [[ $AUTOINSTALL == "yes" ]]; then
533532
if command_exists "sudo"; then
534533
sudo cp "$WORKSPACE/bin/ffmpeg" "$INSTALL_FOLDER/ffmpeg"
535534
sudo cp "$WORKSPACE/bin/ffprobe" "$INSTALL_FOLDER/ffprobe"
536-
echo "Done. ffmpeg is now installed to your system"
535+
echo "Done. ffmpeg is now installed to your system."
537536
else
538537
cp "$WORKSPACE/bin/ffmpeg" "$INSTALL_FOLDER/ffmpeg"
539538
cp "$WORKSPACE/bin/ffprobe" "$INSTALL_FOLDER/ffprobe"
540-
echo "Done. ffmpeg is now installed to your system"
539+
echo "Done. ffmpeg is now installed to your system."
541540
fi
542541
elif [[ ! $SKIPINSTALL == "yes" ]]; then
543542
read -r -p "Install the binary to your $INSTALL_FOLDER folder? [Y/n] " response
@@ -550,7 +549,7 @@ elif [[ ! $SKIPINSTALL == "yes" ]]; then
550549
cp "$WORKSPACE/bin/ffmpeg" "$INSTALL_FOLDER/ffmpeg"
551550
cp "$WORKSPACE/bin/ffprobe" "$INSTALL_FOLDER/ffprobe"
552551
fi
553-
echo "Done. ffmpeg is now installed to your system"
552+
echo "Done. ffmpeg is now installed to your system."
554553
;;
555554
esac
556555
fi

0 commit comments

Comments
 (0)