File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed
Filter options
Expand file tree Collapse file tree 2 files changed +13
-4
lines changed
Original file line number Diff line number Diff line change 1
- build-ffmpeg-mac
1
+ build-ffmpeg
2
2
==========
3
3
4
4
This build script provides an easy way to build ffmpeg on OSX and Linux with non-free codecs included.
@@ -169,4 +169,4 @@ Building done. The binary can be found here: /Volumes/Daten/dev/mac/ffmpeg-build
169
169
170
170
Install the binary to your /usr/local/bin folder? [Y/n] y
171
171
Password:
172
- ```
172
+ ```
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
# https://github.com/markus-perl/ffmpeg-build-script
4
- # Version 0.4
5
4
5
+ VERSION=0.5
6
6
CWD=$( pwd)
7
7
PACKAGES=" $CWD /packages"
8
8
WORKSPACE=" $CWD /workspace"
@@ -17,10 +17,11 @@ if [[ -n $NUMJOBS ]]; then
17
17
MJOBS=$NUMJOBS
18
18
elif [[ -f /proc/cpuinfo ]]; then
19
19
MJOBS=$( grep -c processor /proc/cpuinfo)
20
+ elif [[ " $OSTYPE " == " darwin" * ]]; then
21
+ MJOBS=$( sysctl -n machdep.cpu.thread_count)
20
22
else
21
23
MJOBS=4
22
24
fi
23
- echo " Using $MJOBS make jobs simultaneously."
24
25
25
26
make_dir () {
26
27
if [ ! -d $1 ]; then
@@ -98,11 +99,16 @@ build_done () {
98
99
touch " $PACKAGES /$1 .done"
99
100
}
100
101
102
+ echo " ffmpeg-build-script v$VERSION "
103
+ echo " ========================="
104
+ echo " "
105
+
101
106
case " $1 " in
102
107
" --cleanup" )
103
108
remove_dir $PACKAGES
104
109
remove_dir $WORKSPACE
105
110
echo " Cleanup done"
111
+ echo " "
106
112
exit 0
107
113
;;
108
114
" --build" )
@@ -113,10 +119,13 @@ case "$1" in
113
119
echo " --build: start building process"
114
120
echo " --cleanup: remove all working dirs"
115
121
echo " --help: show this help"
122
+ echo " "
116
123
exit 0
117
124
;;
118
125
esac
119
126
127
+ echo " Using $MJOBS make jobs simultaneously."
128
+
120
129
make_dir $PACKAGES
121
130
make_dir $WORKSPACE
122
131
make_dir $CMPL
You can’t perform that action at this time.
0 commit comments