From: Frédéric Marchal Date: Sun, 12 Feb 2012 15:42:35 +0000 (+0100) Subject: Fix the permissions in the archive file X-Git-Tag: v2.3.3-pre1~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aee4b2efee423f88faa9c577b789640bab172df2;p=thirdparty%2Fsarg.git Fix the permissions in the archive file The archive to distribute a release had the wrong permissions. Every directory was missing the x permission preventing the user from entering into the directory. --- diff --git a/archive.sh b/archive.sh index 1a76dfa..1b98e87 100755 --- a/archive.sh +++ b/archive.sh @@ -23,8 +23,9 @@ fi SargList="$Target/sarglist.txt.unsort" SortList="$Target/sarglist.txt" +DirList="$Target/sargdir.txt" ExcludeList="$Target/sargexclude.txt" -CompressFile="$Target/sarg-$Version.tar.gz" +ArchiveFile="$Target/sarg-$Version.tar" SedSources=$(echo "$Sources" | sed -e 's/\./\\./') ls $Sources/*.c | sed -e "s/^$SedSources\///" > $SargList @@ -37,7 +38,6 @@ aclocal.m4 BETA-TESTERS ChangeLog CMakeLists.txt -configure configure.in CONTRIBUTORS COPYING @@ -75,8 +75,23 @@ po/Makevars sorttable/sorttable.js " >> $SargList -sort $SargList > $SortList -rm $SargList +[ -f "$DirList" ] && rm "$DirList" +cat $SargList | while read file +do + [ -z "$file" ] && continue + if [ -f "$file" ] ; then + echo "$file" >> "$DirList" + elif [ -d "$file" ] ; then + find "$file" -type f >> "$DirList" + else + echo "Unknown file type $file" + exit 1 + fi +done +rm "$SargList" + +sort -u "$DirList" | sed -e '/^$/d' > "$SortList" +rm "$DirList" echo " */.svn @@ -86,7 +101,10 @@ echo " .gitignore " > "$ExcludeList" -tar zcf "$CompressFile" -C "$Sources" --files-from="$SortList" --exclude-from="$ExcludeList" --transform="s,^,sarg-$Version/," --owner root --group root --mode 644 +tar cf "$ArchiveFile" -C "$Sources" --files-from="$SortList" --no-recursion --transform="s,^,sarg-$Version/," --owner root --group root --mode 644 +tar rf "$ArchiveFile" -C "$Sources" "configure" --exclude-from="$ExcludeList" --transform="s,^,sarg-$Version/," --owner root --group root --mode 755 +gzip -f "$ArchiveFile" +CompressFile="$ArchiveFile.gz" md5sum $CompressFile > "$Target/sarg-$Version.md5sum" echo "md5sum:"