aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2009-09-09 20:21:06 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2009-09-09 20:21:06 +0000
commita691e38cf594fadb1a783ce093c9a491ba607730 (patch)
treebc8b58b76331bd8b7e5f7c642de6d2d904ba06b0
parent7b7d3181a8a4c9b59ac42b4986549d1989fa1aba (diff)
downloadsimplepkg-a691e38cf594fadb1a783ce093c9a491ba607730.tar.gz
simplepkg-a691e38cf594fadb1a783ce093c9a491ba607730.tar.bz2
Fixing procedures used to find packages
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@815 04377dda-e619-0410-9926-eae83683ac58
-rw-r--r--trunk/lib/common.sh10
-rw-r--r--trunk/src/createpkg17
-rwxr-xr-xtrunk/src/simplaret4
3 files changed, 15 insertions, 16 deletions
diff --git a/trunk/lib/common.sh b/trunk/lib/common.sh
index ea4130d..f1879c1 100644
--- a/trunk/lib/common.sh
+++ b/trunk/lib/common.sh
@@ -74,11 +74,11 @@ function pkg_ext_find {
if [ ! -z "$1" ]; then
match="$1"
else
- match="*"
+ match="'*'"
fi
exts="`echo "$(pkg_ext $match)" | sed -e 's/ / -or -name /g'`"
- echo "( -name $exts )"
+ echo "\( -name $exts \)"
}
@@ -1228,7 +1228,7 @@ function gen_filelist {
# generate FILELIST.TXT
# usage: gen_filelist
- find . -type f $(pkg_ext_find) -follow -print | sort | tr '\n' '\0' | \
+ eval find . -type f -and $(pkg_ext_find) -follow -print | sort | tr '\n' '\0' | \
xargs -0r ls -ldL --time-style=long-iso > FILELIST.TXT
echo "Created new FILELIST.TXT"
@@ -1250,7 +1250,7 @@ function gen_patches_filelist {
cd $folder
- find . -type f $(pkg_ext_find) -follow -print | sort | tr '\n' '\0' | \
+ eval find . -type f -and $(pkg_ext_find) -follow -print | sort | tr '\n' '\0' | \
xargs -0r ls -ldL --time-style=long-iso > FILE_LIST
svn_add FILE_LIST
@@ -1316,7 +1316,7 @@ function gen_md5_checksums {
echo 'MD5 digest for files in this directory.' > CHECKSUMS.md5
echo '' >> CHECKSUMS.md5
- find . -type f $(pkg_ext_find) -exec md5sum {} \; >> CHECKSUMS.md5
+ eval find . -type f -and $(pkg_ext_find) -exec md5sum {} \; >> CHECKSUMS.md5
cat CHECKSUMS.md5 | gzip -9 -c - > CHECKSUMS.md5.gz
svn_add CHECKSUMS.md5
diff --git a/trunk/src/createpkg b/trunk/src/createpkg
index 584e2e7..021e712 100644
--- a/trunk/src/createpkg
+++ b/trunk/src/createpkg
@@ -83,11 +83,10 @@ ${red}EXAMPLES${normal}
sync repository first, then build and install scilab package
${red}AUTHOR${normal}
- Written by ${blue}Rudson R. Alves${normal}
+ Written by ${blue}Rudson R. Alves${normal} and ${blue}Silvio Rhatto${normal}
${red}AVAILABILITY${normal}
- by svn: ${yellow}svn checkout svn://slack.sarava.org/simplepkg${normal}
- this mkbuild is found in branches/0.6/
+ by svn: ${yellow}svn checkout http://slack.sarava.org/simplepkg${normal}
${red}REPORTING BUGS${normal}
Report bugs to <${blue}rudsonalves[at]rra.etc.br${normal}>
@@ -426,7 +425,7 @@ function remove_old_package_data {
cd $makepkg_repos
# Using -mindepth 2 so it doesn't delete the new PACKAGE
- for file in `find . -mindepth 2 $(pkg_ext_find $PACKAGE-*-*-*) -o -name "$PACKAGE-*-*-*.meta" -o -name "$PACKAGE-*-*-*.*.asc"`; do
+ for file in `eval find . -mindepth 2 $(pkg_ext_find $PACKAGE-*-*-*) -o -name "$PACKAGE-*-*-*.meta" -o -name "$PACKAGE-*-*-*.*.asc"`; do
candidate="`echo $file | sed -e 's/\.meta$/\.tgz/'`" # otherwise PACKAGE info functions can fail
candidate="`echo $candidate | sed -e 's/\.asc$//'`" # otherwise PACKAGE info functions can fail
# Just delete packages with different arch, version, build number or folder
@@ -451,7 +450,7 @@ function remove_old_package_data {
else
# Using -mindepth 2 so it doesn't delete the new package
- find $makepkg_repos -mindepth 2 $(pkg_ext_find $PACKAGE-*-*-*) -exec rm {} 2>/dev/null \;
+ eval find $makepkg_repos -mindepth 2 $(pkg_ext_find $PACKAGE-*-*-*) -exec rm {} 2>/dev/null \;
find $makepkg_repos -mindepth 2 -name "$PACKAGE-*-*-*.meta" -exec rm {} 2>/dev/null \;
find $makepkg_repos -mindepth 2 -name "$PACKAGE-*-*-*.*.asc" -exec rm {} 2>/dev/null \;
find $makepkg_repos -name "$PACKAGE.slack-required" -exec rm {} 2>/dev/null \;
@@ -486,7 +485,7 @@ function update_metadata {
found_patch="no"
- for file in `find patches/ $(pkg_ext_find $PACKAGE-*-*-*)`; do
+ for file in `eval find patches/ $(pkg_ext_find $PACKAGE-*-*-*)`; do
found_patch="yes"
update_md5_checksum $makepkg_repos/patches patches/$SUBFOLDER/$PKG_NAME
done
@@ -513,7 +512,7 @@ function list_packages {
for repository in $repositories; do
echo "Packages from $repository..."
- find $repository $(pkg_ext_find)
+ eval find $repository $(pkg_ext_find)
done
}
@@ -539,7 +538,7 @@ function remove_package {
cd $repository
- for file in `find . $(pkg_ext_find $package-*-*-*) -o -name "$package-*-*-*.meta" -o -name "$package-*-*-*.*.asc"`; do
+ for file in `eval find . $(pkg_ext_find $package-*-*-*) -o -name "$package-*-*-*.meta" -o -name "$package-*-*-*.*.asc"`; do
svn_del $file
if [ -e "CHECKSUMS.md5" ] && echo $file | grep -q -E -e "$(pkg_ext_grep)$"; then
# remove md5 information
@@ -580,7 +579,7 @@ function sign_package {
cd $repository
- for file in `find . $(pkg_ext_find $package-*-*-*)`; do
+ for file in `eval find . $(pkg_ext_find $package-*-*-*)`; do
echo "Signing package..."
diff --git a/trunk/src/simplaret b/trunk/src/simplaret
index 27827c6..7b157bb 100755
--- a/trunk/src/simplaret
+++ b/trunk/src/simplaret
@@ -507,7 +507,7 @@ function simplaret_search_and_delete {
return 1
fi
- for file in `find $2/ $(pkg_ext_find $name*) 2> /dev/null`; do
+ for file in `eval find $2/ $(pkg_ext_find $name*) 2> /dev/null`; do
candidate="`basename $file`"
version="`package_version $candidate`"
build="`package_build $candidate`"
@@ -540,7 +540,7 @@ function simplaret_search_and_delete {
else
- for file in `find $2/ $(pkg_ext_find $name*) 2> /dev/null`; do
+ for file in `eval find $2/ $(pkg_ext_find $name*) 2> /dev/null`; do
candidate="`basename $file`"
version="`package_version $candidate`"
build="`package_build $candidate`"