summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorAndrew Udvare <audvare@gmail.com>2020-12-18 03:23:37 -0500
committerThorsten Behrens <thorsten.behrens@allotropia.de>2021-02-26 00:33:45 +0100
commitf3b7dc649bc384be6000d98a87763cab26fe3f32 (patch)
treed934f003d8a608c0ed6038a0e7a35f3254d2f1ae /bin
parenta01ae07740e5c311fcc37f2ac2e2a0a2a1935920 (diff)
fix unpack-sources to not require GNU find
This makes bin/unpack-sources work on systems that do not have GNU coreutils in PATH, such as macOS. Change-Id: I54ed219eedf0f45c039edb6e486f3afe273dd51f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107936 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/unpack-sources6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/unpack-sources b/bin/unpack-sources
index 2408eda1e14c..7221696e199f 100755
--- a/bin/unpack-sources
+++ b/bin/unpack-sources
@@ -85,7 +85,7 @@ for tarball in $tarballs ; do
fi
# create symlinks for module directories; ignore git-hooks directory
- for dir in `find "$lo_src_dir/$tarname" -mindepth 1 -maxdepth 1 -type d -path $lo_src_dir/$tarname/git-hooks -o -printf "$tarname/%f\n"` ; do
- ln -sf "src/$dir" "$start_dir"
- done
+ while read -r dir; do
+ ln -sf "src/${tarname}/$(basename "$dir")" "$start_dir"
+ done < <(find "$lo_src_dir/$tarname" -mindepth 1 -maxdepth 1 -type d -path $lo_src_dir/$tarname/git-hooks)
done