]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Fix the permissions in the archive file
authorFrédéric Marchal <fmarchal@users.sourceforge.net>
Sun, 12 Feb 2012 15:42:35 +0000 (16:42 +0100)
committerFrédéric Marchal <fmarchal@users.sourceforge.net>
Sun, 12 Feb 2012 15:42:35 +0000 (16:42 +0100)
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

index 1a76dfa05b480cf7094b2b5ac48a3f34e4e60dd6..1b98e87da458ca7335faaca87599bc0ef9a83f50 100755 (executable)
@@ -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:"