Make number of cores used for compilation a command line option for easyinstall.sh (#465)

This commit is contained in:
Daniel Markstedt 2021-11-14 01:42:34 -08:00 committed by GitHub
parent a3645dfecc
commit df361f70d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 4 deletions

View File

@ -79,7 +79,8 @@ function installRaScsi() {
cd "$BASE/src/raspberrypi" || exit 1
( make clean && make -j $(nproc) all CONNECT_TYPE="${CONNECT_TYPE-FULLSPEC}" && sudo make install CONNECT_TYPE="${CONNECT_TYPE-FULLSPEC}" ) </dev/null
echo "Compiling with ${CORES-1} simultaneous cores..."
( make clean && make -j "${CORES-1}" all CONNECT_TYPE="${CONNECT_TYPE-FULLSPEC}" && sudo make install CONNECT_TYPE="${CONNECT_TYPE-FULLSPEC}" ) </dev/null
sudo sed -i "s@^ExecStart.*@& -F $VIRTUAL_DRIVER_PATH@" /etc/systemd/system/rascsi.service
echo "Configured rascsi.service to use $VIRTUAL_DRIVER_PATH as default image dir."
@ -753,9 +754,12 @@ while [ "$1" != "" ]; do
-c | --connect_type)
CONNECT_TYPE=$VALUE
;;
-r | --run_choice)
RUN_CHOICE=$VALUE
;;
-r | --run_choice)
RUN_CHOICE=$VALUE
;;
-j | --cores)
CORES=$VALUE
;;
*)
echo "ERROR: unknown parameter \"$PARAM\""
exit 1