From 9d0e116758d95a9408712d962b22ffe192fd091a Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Fri, 31 Dec 2021 00:48:23 -0300 Subject: [PATCH] Run linkFile() with root privileges --- scripts/linkFiles.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/linkFiles.sh b/scripts/linkFiles.sh index ae0238b..471aa89 100755 --- a/scripts/linkFiles.sh +++ b/scripts/linkFiles.sh @@ -96,7 +96,7 @@ loopThroughFiles() { if [[ -f "$srcFile" ]]; then var=$(echo "$srcFile" | awk '{ sub(/.*CocoRice\/dotfiles\/other\//, ""); print }') - sudo linkFile "$srcFile" "/$var" + sudo bash -c "$(declare -f linkFile); "linkFile" "$srcFile" "/$var"" fi done }