From 9bb6e4b72d1d121c69f33e0fabea2dc21aa28f8e Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Sun, 6 Feb 2022 18:09:14 -0300 Subject: [PATCH] Fix more bugs (create relative symlink) --- build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 11cf584..d6c6afd 100755 --- a/build.sh +++ b/build.sh @@ -1,14 +1,14 @@ #!/usr/bin/env bash getAnyPackages() { - mapfile -t pkgs < <(find -H "any" -mindepth 1 -type f -regex '.*.pkg.tar.zst.*') + mapfile -t pkgs < <(find -H "$PWD/any" -mindepth 1 -type f -regex '.*.pkg.tar.zst.*') for arch in "x86_64" "i686" "aarch64"; do cd "$arch" || { echo "Couldn't cd into '$arch'." 1>&2 && exit 1; } for pkg in "${pkgs[@]}"; do if [ "$dryRunFlag" = false ]; then - ln -sf "$pkg" "$(basename "$pkg")" + ln -srf "$pkg" "$(basename "$pkg")" else - echo "ln -sf $pkg $(basename "$pkg")" + echo "ln -srf $pkg $(basename "$pkg")" fi done cd .. || { echo "Couldn't cd into the parent folder." 1>&2 && exit 1; }