From 19a3ad9cdf3a1f89381ecb7b5f9bcc94df9edded Mon Sep 17 00:00:00 2001 From: eichehome Date: Thu, 20 Apr 2023 16:04:43 +0200 Subject: [PATCH] Fixed Bug where find finds multiple Files --- base.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/base.sh b/base.sh index ea88194..f092a86 100644 --- a/base.sh +++ b/base.sh @@ -193,15 +193,15 @@ if [[ $configuration == 1 ]]; then # Ethernet echo "Ethernet" #ethernet_network=$(find / -type f -name 20-ethernet.network | grep configs) - cp "$(find "${PWD}" -type f -name 20-ethernet.network)" /etc/systemd/network/ + cp "$(find "${PWD}" -type f -path '*/configs/*' -name 20-ethernet.network)" /etc/systemd/network/ # Wlan echo "WLAN" #wlan_network=$(find / -type f -name 20-wlan.network | grep configs) - cp "$(find "${PWD}" -type f -name 20-wlan.network)" /etc/systemd/network/ + cp "$(find "${PWD}" -type f -path '*/configs/*' -name 20-wlan.network)" /etc/systemd/network/ # Wwan (Mobilefunk) echo "Mobilfunk" #wwan_network=$(find / -type f -name 20-wwan.network | grep configs) - cp "$(find "${PWD}" -type f -name 20-wwan.network)" /etc/systemd/network/ + cp "$(find "${PWD}" -type f -path '*/configs/*' -name 20-wwan.network)" /etc/systemd/network/ elif [[ $configuration == 2 ]]; then pacman -S fwupd networkmanager modemmanager avahi bluez bluez-utils sshfs pipewire pipewire-audio pipewire-alsa pipewire-pulse pipewire-jack pipewire-zeroconf pipewire-v4l2 pipewire-docs pipewire-roc helvum wireplumber gstreamer gst-plugin-pipewire gst-libav gst-plugins-good gst-plugins-base xdg-desktop-portal-gnome espeak-ng networkmanager-openconnect networkmanager-openvpn networkmanager-pptp networkmanager-vpnc power-profiles-daemon plymouth @@ -211,11 +211,11 @@ elif [[ $configuration == 2 ]]; then systemctl enable NetworkManager # Configure IWD as Backend for Networkmanager #wifi_backend_conf=$(find / -type f -name wifi_backend.conf | grep configs) - cp "$(find "${PWD}" -type f -name wifi_backend.conf)" /etc/NetworkManager/conf.d/ + cp "$(find "${PWD}" -type f -path '*/configs/*' -name wifi_backend.conf)" /etc/NetworkManager/conf.d/ # Disable MulticastDNS in systemd-resolved #disable_multicastDNS_conf=$(find / -type f -name disable-multicastDNS.conf | grep configs) mkdir -p /etc/systemd/resolved.conf.d - cp "$(find "${PWD}" -type f -name disable-multicastDNS.conf)" /etc/systemd/resolved.conf.d/ + cp "$(find "${PWD}" -type f -path '*/configs/*' -name disable-multicastDNS.conf)" /etc/systemd/resolved.conf.d/ systemctl enable avahi-daemon systemctl enable bluetooth systemctl enable gdm @@ -274,10 +274,10 @@ scriptpfad="${PWD}-${0}" scriptpfad="${scriptpfad//-.}" scriptpfad="${scriptpfad//base.sh}" #loader_conf=$(find / -type f -name loader.conf | grep configs) -cp "$(find "${scriptpfad}" -type f -name loader.conf)" /boot/loader/ +cp "$(find "${scriptpfad}" -type f -path '*/configs/*' -name loader.conf)" /boot/loader/ #$selectedKernel="linux linux-lts linux-zen" -entry_conf=$(find "${PWD}" -type f -name entry.conf) +entry_conf=$(find "${PWD}" -type f -path '*/configs/*' -name entry.conf) for kernel in $selectedKernel; do boot_entry_name="${kernel//linux/arch}"; # Standart