Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- INSTALL_PATH=~/ubin
- WORK_PATH=/media/ramdisk
- URL=https://bitbucket.org/multicoreware/x265_git.git
- CORES=$(($(grep -m 1 "cpu cores" /proc/cpuinfo | awk '{print $4}')+1))
- printf "\n\033[0;32mFetching source...\033[0m\n"
- git clone $URL $WORK_PATH/x265
- printf "\n\033[0;32mBuilding x265 binary...\033[0m\n"
- cd $WORK_PATH/x265/build/linux
- cmake -D CMAKE_FIND_LIBRARY_SUFFIXES=".a" -D ENABLE_SHARED=OFF -D CMAKE_EXE_LINKER_FLAGS="-static" -G "Unix Makefiles" ../../source/
- if make -j$CORES; then
- printf "\n\033[0;32mCompressing & moving x265 binary to "$INSTALL_PATH"...\033[0m\n"
- rm -f $INSTALL_PATH/x265
- upx --lzma -9 -o $INSTALL_PATH/x265 x265
- printf "\n\033[0;32mDone. Cleaning up.\033[0m\n"
- cd $WORK_PATH
- rm -rf x265
- else
- printf "\n\033[0;31mAborted - compiling error.\033[0m\n"
- exit 1
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement