Skip to content
This repository was archived by the owner on Jan 27, 2025. It is now read-only.

Commit 288b513

Browse files
authored
script: cooler than before
Do not handle JACK if there's more than 16GB of RAM; Asking user if he wants to sync or just do a quick build; Space derp fixed;
1 parent 354c594 commit 288b513

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

build-dakkar.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ elif [[ $(uname -s) = "Linux" ]];then
1313
fi
1414

1515
## handle command line arguments
16+
read -p "Do you want to sync? " choice
1617

1718
function help() {
1819
cat <<EOF
@@ -291,8 +292,10 @@ function build_variant() {
291292
}
292293

293294
function jack_env() {
294-
RAM=$(free | awk '/^Mem:/{ printf("%0.f", $2/(1024^2) - 1)}') #here's where the calc happens
295-
export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx "$RAM"G"
295+
RAM=$(free | awk '/^Mem:/{ printf("%0.f", $2/(1024^2))}') #calculating how much RAM (wow, such ram)
296+
if [[ "$RAM" -lt 16 ]];then #if we're poor guys with less than 16gb
297+
export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx"$((RAM -1))"G"
298+
fi
296299
}
297300

298301
parse_options "$@"
@@ -304,11 +307,13 @@ if [[ -z "$mainrepo" || ${#variant_codes[*]} -eq 0 ]]; then
304307
exit 1
305308
fi
306309

310+
if [[ $choice == *"y"* ]];then
307311
init_release
308312
init_main_repo
309313
init_local_manifest
310314
init_patches
311315
sync_repo
316+
fi
312317
patch_things
313318
jack_env
314319

0 commit comments

Comments
 (0)