aboutsummaryrefslogtreecommitdiff
path: root/trunk/src/repos
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-04-03 22:19:09 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-04-03 22:19:09 +0000
commit9fd9f2355cbfc030d16c5ca24433a87c88889637 (patch)
tree915462474ad44d71642517e0e032673b1a89053f /trunk/src/repos
parent6ba7e185fde258f6040f16a2c4413352bc061fef (diff)
downloadsimplepkg-9fd9f2355cbfc030d16c5ca24433a87c88889637.tar.gz
simplepkg-9fd9f2355cbfc030d16c5ca24433a87c88889637.tar.bz2
- jail-commit warning for file not found
- repos: cosmetic changes - templatepkg: now supports a tagfile or slack-required as a template git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@212 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk/src/repos')
-rwxr-xr-xtrunk/src/repos37
1 files changed, 30 insertions, 7 deletions
diff --git a/trunk/src/repos b/trunk/src/repos
index 465714b..95a3936 100755
--- a/trunk/src/repos
+++ b/trunk/src/repos
@@ -8,24 +8,39 @@
# the Free Software Foundation; either version 2 of the License, or
# any later version.
#
-# changes by rhatto at riseup.net to fit http://slack.sarava.org needs
-#
+# Changes by rhatto at riseup.net to fit http://slack.sarava.org needs
+#
+# TODO: - simplepkg's config file support
+# - integration with binary repository
+# - package's and CHECKSUMS.md5 signature creation
+#
+
+function usage {
+
+ echo "`basename $0` [pkg [file]|all|new|svnmeta|PACKAGESTXT|FILELIST|MD5]"
+
+}
function svn_add_meta {
+
find *meta -exec svn add {} 2> /dev/null \;
find . -name *meta -exec svn add {} 2> /dev/null \;
+
}
function gen_filelist {
+
for file in `find | grep -e ".tgz$"`; do ls -l $file; done > FILELIST.TXT
echo "Created new FILELIST.TXT"
if [ -d "patches" ]; then
for file in `find patches | grep -e ".tgz$"`; do ls -l $file; done > patches/FILE_LIST
echo "Created new patches/FILE_LIST"
fi
+
}
function gen_packages_txt {
+
echo '' > PACKAGES.TXT
find . -type f -name '*.meta' -exec cat {} \; >> PACKAGES.TXT
cat PACKAGES.TXT | gzip -9 -c - > PACKAGES.TXT.gz
@@ -35,9 +50,11 @@ function gen_packages_txt {
cat patches/PACKAGES.TXT | gzip -9 -c - > patches/PACKAGES.TXT.gz
echo "Created new patches/PACKAGES.TXT and patches/PACKAGES.TXT.gz"
fi
+
}
function gen_md5_checksums {
+
echo '' > CHECKSUMS.md5
find . -type f -name '*.tgz' -exec md5sum {} \; >> CHECKSUMS.md5
cat CHECKSUMS.md5 | gzip -9 -c - > CHECKSUMS.md5.gz
@@ -47,9 +64,11 @@ function gen_md5_checksums {
cat patches/CHECKSUMS.md5 | gzip -9 -c - > patches/CHECKSUMS.md5.gz
echo "Created new patches/CHECKSUMS.md5 and patches/CHECKSUMS.md5.gz"
fi
+
}
function gen_meta {
+
if [ ! -f $1 ]; then
echo "File not found: $1"
exit 1;
@@ -80,27 +99,30 @@ function gen_meta {
echo "PACKAGE DESCRIPTION:" >> $LOCATION/$METAFILE
tar xzfO $1 install/slack-desc | grep -E '\w+\:'|grep -v '^#' >> $LOCATION/$METAFILE
echo "" >> $LOCATION/$METAFILE
+
}
function do_all {
+
for pkg in `find . -type f -name '*.tgz' -print`; do
gen_meta $pkg
done
$0 PACKAGESTXT
$0 FILELIST
$0 MD5
-}
-function show_usage {
- echo "`basename $0` [pkg [file]|all|new|svnmeta|PACKAGESTXT|FILELIST|MD5]"
}
+# ---------------------------------
+# main
+# ---------------------------------
+
case "$1" in
pkg)
if [ -n "$2" ]; then
gen_meta $2
else
- show_usage
+ usage
fi
;;
all)
@@ -126,10 +148,11 @@ case "$1" in
gen_md5_checksums
;;
usage)
- show_usage
+ usage
;;
*)
do_all
svn_add_meta
;;
esac
+