Fixed Bug where find finds multiple Files

This commit is contained in:
eichehome 2023-04-20 16:04:43 +02:00
parent 7c0925f004
commit 19a3ad9cdf

14
base.sh
View file

@ -193,15 +193,15 @@ if [[ $configuration == 1 ]]; then
# Ethernet # Ethernet
echo "Ethernet" echo "Ethernet"
#ethernet_network=$(find / -type f -name 20-ethernet.network | grep configs) #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 # Wlan
echo "WLAN" echo "WLAN"
#wlan_network=$(find / -type f -name 20-wlan.network | grep configs) #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) # Wwan (Mobilefunk)
echo "Mobilfunk" echo "Mobilfunk"
#wwan_network=$(find / -type f -name 20-wwan.network | grep configs) #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 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 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 systemctl enable NetworkManager
# Configure IWD as Backend for Networkmanager # Configure IWD as Backend for Networkmanager
#wifi_backend_conf=$(find / -type f -name wifi_backend.conf | grep configs) #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 in systemd-resolved
#disable_multicastDNS_conf=$(find / -type f -name disable-multicastDNS.conf | grep configs) #disable_multicastDNS_conf=$(find / -type f -name disable-multicastDNS.conf | grep configs)
mkdir -p /etc/systemd/resolved.conf.d 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 avahi-daemon
systemctl enable bluetooth systemctl enable bluetooth
systemctl enable gdm systemctl enable gdm
@ -274,10 +274,10 @@ scriptpfad="${PWD}-${0}"
scriptpfad="${scriptpfad//-.}" scriptpfad="${scriptpfad//-.}"
scriptpfad="${scriptpfad//base.sh}" scriptpfad="${scriptpfad//base.sh}"
#loader_conf=$(find / -type f -name loader.conf | grep configs) #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" #$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 for kernel in $selectedKernel; do
boot_entry_name="${kernel//linux/arch}"; boot_entry_name="${kernel//linux/arch}";
# Standart # Standart