Skip to content
This repository has been archived by the owner on Jul 30, 2020. It is now read-only.

Commit

Permalink
Comment the macOS related hack in before_deploy.sh.
Browse files Browse the repository at this point in the history
  • Loading branch information
scturtle committed Feb 7, 2018
1 parent 3b24446 commit 6a0f995
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ci/before_deploy.sh
Expand Up @@ -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 ;;
Expand Down

0 comments on commit 6a0f995

Please sign in to comment.