From ab7563f4ecb6c306b9184027bef935c649f837bd Mon Sep 17 00:00:00 2001 From: Keule2 Date: Mon, 3 Aug 2026 22:29:20 +0200 Subject: [PATCH] fix: system-setup script makepkg flags --- executable_mount_server.sh | 11 +++++++++-- run_once_05-system-setup.sh.tmpl | 4 +++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/executable_mount_server.sh b/executable_mount_server.sh index 960090a..709d5fe 100644 --- a/executable_mount_server.sh +++ b/executable_mount_server.sh @@ -1,16 +1,20 @@ #!/bin/bash +set -e + cred_file="$HOME/.smbcred" -mount_dir="$HOME/server_data" server_ip=192.168.178.20 server_dir="$1" if [ -z "$1" ]; then server_dir="keule_data" -elif [ -n "$2" ]; then +fi +mount_dir="$server_dir" +if [ -n "$2" ]; then mount_dir="$2" fi + if [ ! -d "$mount_dir" ]; then mkdir --parents $mount_dir fi @@ -21,3 +25,6 @@ mountNas() { } mountNas $server_ip + + +echo "Mounted at: $mount_dir" diff --git a/run_once_05-system-setup.sh.tmpl b/run_once_05-system-setup.sh.tmpl index 3ade099..90fb34f 100755 --- a/run_once_05-system-setup.sh.tmpl +++ b/run_once_05-system-setup.sh.tmpl @@ -15,7 +15,9 @@ case "$DISTRO_ID" in sudo install -m644 "$SRC/assets/pacman.conf" /etc/pacman.conf echo ">>> [system-setup] tuning makepkg.conf" - sudo sed -i 's/^#MAKEFLAGS=/MAKEFLAGS="-j'"$(nproc)"'"/' /etc/makepkg.conf + jobs=$(( $(nproc) / 2 )) + (( jobs < 1 )) && jobs=1 + sudo sed -i "s/^#\\?MAKEFLAGS=.*/MAKEFLAGS=\"-j$jobs\"/" /etc/makepkg.conf ;; ubuntu)