]>
git.ipfire.org Git - thirdparty/sarg.git/blob - archive.sh
6 Version
=$
(cat "$Sources/CMakeLists.txt" |
sed -n -e 's/^SET(sarg_VERSION \([0-9]\))/\1/p')
7 if [ -z "$Version" ] ; then
8 echo "No version found"
11 Revision
=$
(cat "$Sources/CMakeLists.txt" |
sed -n -e 's/^SET(sarg_REVISION "\([0-9][0-9]*.*\)")/\1/p')
12 if [ -z "$Revision" ] ; then
13 echo "No revision found"
16 Version
="$Version.$Revision"
18 VersionCheck
=$
(cat "$Sources/configure.in" |
sed -n -e 's/^AC_INIT(\[sarg\],\[\([0-9][0-9]*\.[0-9][0-9]*.*\)\])/\1/p')
19 if [ "x$Version" != "x$VersionCheck" ] ; then
20 echo "CMakeLists and configure doesn't refer to the same version"
24 SargList
="$Target/sarglist.txt.unsort"
25 SortList
="$Target/sarglist.txt"
26 DirList
="$Target/sargdir.txt"
27 ExcludeList
="$Target/sargexclude.txt"
28 ArchiveFile
="$Target/sarg-$Version.tar"
30 SedSources
=$
(echo "$Sources" |
sed -e 's/\./\\./')
31 ls $Sources/*.c |
sed -e "s/^$SedSources\///" > $SargList
32 ls $Sources/include
/*.h |
sed -e "s/^$SedSources\///" >> $SargList
33 ls $Sources/po
/*.
{po
,gmo
,pot
} |
sed -e "s/^$SedSources\///" >> $SargList
66 po/remove-potcdate.sin
78 sorttable/sorttable.js
81 [ -f "$DirList" ] && rm "$DirList"
82 cat $SargList |
while read file
84 [ -z "$file" ] && continue
85 if [ -f "$file" ] ; then
86 echo "$file" >> "$DirList"
87 elif [ -d "$file" ] ; then
88 find "$file" -type f
>> "$DirList"
90 echo "Unknown file type $file"
96 sort -u "$DirList" |
sed -e '/^$/d' > "$SortList"
107 tar cf
"$ArchiveFile" -C "$Sources" --files-from="$SortList" --exclude-from="$ExcludeList" --no-recursion --transform="s,^,sarg-$Version/," --owner root
--group root
--mode 644
108 tar rf
"$ArchiveFile" -C "$Sources" "configure" --exclude-from="$ExcludeList" --transform="s,^,sarg-$Version/," --owner root
--group root
--mode 755
109 gzip -f "$ArchiveFile"
110 CompressFile
="$ArchiveFile.gz"
112 md5sum $CompressFile > "$Target/sarg-$Version.md5sum"
114 cat "$Target/sarg-$Version.md5sum"
116 sha1sum $CompressFile > "$Target/sarg-$Version.sha1sum"
118 cat "$Target/sarg-$Version.sha1sum"
120 sha256sum
$CompressFile > "$Target/sarg-$Version.sha256sum"
122 cat "$Target/sarg-$Version.sha256sum"