From aee4b2efee423f88faa9c577b789640bab172df2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Marchal?= Date: Sun, 12 Feb 2012 16:42:35 +0100 Subject: [PATCH] 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. --- archive.sh | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) 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:" -- 2.47.2