From 9986ae5a426f208382850b6aa6c699249d67d851 Mon Sep 17 00:00:00 2001 From: scturtle Date: Wed, 7 Feb 2018 16:41:59 +0800 Subject: [PATCH] Comment the macOS related hack in before_deploy.sh. --- ci/before_deploy.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ci/before_deploy.sh b/ci/before_deploy.sh index 4f1b75b7..25fa14e0 100755 --- a/ci/before_deploy.sh +++ b/ci/before_deploy.sh @@ -29,11 +29,15 @@ cd "$pkg" strip "$strip_option" "$name/bin/cquery" "$name/${libclang[-1]}" case $(uname -s) in Darwin) + # https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/tar.1.html + # macOS's bsdtar is lack of flags to set uid/gid. + # First, we generate a list of file in mtree format. tar -cf filelist --format=mtree --options="!all,time,mode,type" "$name" + # Then add a line "/set uid=0 gid=0" after the first line "#mtree". awk '/#mtree/{print;print "/set uid=0 gid=0";next}1' filelist > newflielist + # Finally, use the list to generate the tarball. tar -zcf "$root/build/$name.tar.gz" @newflielist ;; Linux) - # ./bin/cquery -> $name/bin/cquery tar -Jcf "$root/build/$name.tar.xz" --owner 0 --group 0 $name ;; *) tar -Jcf "$root/build/$name.tar.xz" --uid 0 --gid 0 $name ;;