mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
refactor: make bootstrap-osx.sh verbose and fail on error
This commit is contained in:
parent
cefe17651a
commit
c9b1de0c27
|
@ -17,23 +17,53 @@
|
||||||
# it's being build, please keep in mind that changing just bootstrap.sh
|
# it's being build, please keep in mind that changing just bootstrap.sh
|
||||||
# *IS NOT* and will not be sufficient - you should update INSTALL.md first.
|
# *IS NOT* and will not be sufficient - you should update INSTALL.md first.
|
||||||
|
|
||||||
echo Creating directories…
|
set -eu -o pipefail
|
||||||
mkdir -p libs/lib
|
|
||||||
mkdir -p libs/include
|
|
||||||
echo Copying libraries…
|
|
||||||
cp /usr/local/lib/libsodium* libs/lib
|
|
||||||
cp /usr/local/lib/libvpx* libs/lib
|
|
||||||
cp /usr/local/lib/libopus* libs/lib
|
|
||||||
cp /usr/local/lib/libav* libs/lib
|
|
||||||
cp /usr/local/lib/libswscale* libs/lib
|
|
||||||
cp /usr/local/lib/libqrencode* libs/lib
|
|
||||||
cp /usr/local/lib/libsqlcipher* libs/lib
|
|
||||||
echo Copying include files...
|
|
||||||
cp -r /usr/local/include/vpx* libs/include
|
|
||||||
cp -r /usr/local/include/sodium* libs/include
|
|
||||||
cp -r /usr/local/include/qrencode* libs/include
|
|
||||||
cp -r /usr/local/include/libav* libs/include
|
|
||||||
cp -r /usr/local/include/libswscale* libs/include
|
|
||||||
cp -r /usr/local/include/sqlcipher* libs/include
|
|
||||||
echo Done.
|
|
||||||
|
|
||||||
|
|
||||||
|
# copy libs to given destination
|
||||||
|
copy_libs() {
|
||||||
|
local dest="$@"
|
||||||
|
local libs=(
|
||||||
|
/usr/local/lib/libsodium*
|
||||||
|
/usr/local/lib/libvpx*
|
||||||
|
/usr/local/lib/libopus*
|
||||||
|
/usr/local/lib/libav*
|
||||||
|
/usr/local/lib/libswscale*
|
||||||
|
/usr/local/lib/libqrencode*
|
||||||
|
/usr/local/lib/libsqlcipher*
|
||||||
|
)
|
||||||
|
echo Copying libraries…
|
||||||
|
for lib in "${libs[@]}"
|
||||||
|
do
|
||||||
|
cp -v "$lib" "$dest"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# copy includes to given destination
|
||||||
|
copy_includes() {
|
||||||
|
local dest="$@"
|
||||||
|
local includes=(
|
||||||
|
/usr/local/include/vpx*
|
||||||
|
/usr/local/include/sodium*
|
||||||
|
/usr/local/include/qrencode*
|
||||||
|
/usr/local/include/libav*
|
||||||
|
/usr/local/include/libswscale*
|
||||||
|
/usr/local/include/sqlcipher*
|
||||||
|
)
|
||||||
|
echo Copying include files…
|
||||||
|
for include in "${includes[@]}"
|
||||||
|
do
|
||||||
|
cp -v -r "$include" "$dest"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
main() {
|
||||||
|
local libs_dir="libs/lib"
|
||||||
|
local inc_dir="libs/include"
|
||||||
|
echo Creating directories…
|
||||||
|
mkdir -v -p "$libs_dir" "$inc_dir"
|
||||||
|
copy_libs "$libs_dir"
|
||||||
|
copy_includes "$inc_dir"
|
||||||
|
echo Done.
|
||||||
|
}
|
||||||
|
main
|
||||||
|
|
Loading…
Reference in New Issue
Block a user