]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
simplaret: small fix
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Sat, 9 Dec 2006 13:56:44 +0000 (13:56 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Sat, 9 Dec 2006 13:56:44 +0000 (13:56 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@46 04377dda-e619-0410-9926-eae83683ac58

src/simplaret

index a0e2a8342e8091d21960b7c8c8778510a99e8b57..4813e2a61928d79dba23accd7b7bfdb5e40bce64 100755 (executable)
@@ -92,7 +92,7 @@ function simplaret_check_index {
 function simplaret_download {
 
   # downloads a file from a repo to a folder
-  # usage: simplaret <repos_url> <package> <destination-folder>
+  # usage: simplaret <repository_url> <package> <destination-folder>
 
   protocol="`echo $1 | cut -d : -f 1`"
 
@@ -164,7 +164,7 @@ function simplaret_repository_url {
 
   if echo $repository | grep -qe %; then
     repository_url="`echo $repository | cut -d % -f 2`"
-    if [ -z "$repos_url" ]; then
+    if [ -z "$repository_url" ]; then
       echo you should set a url for the repository $repository
       echo please correct your $REPOS_CONF
       exit 1
@@ -259,7 +259,7 @@ function simplaret_show_package {
 
 function simplaret_search {
 
-  local priority
+  local priority message
 
   for repos_type in patches root repos noarch; do
 
@@ -272,8 +272,12 @@ function simplaret_search {
 
       if [ ! -f "$storage/$repository_name/FILELIST.TXT" ]; then
         if [ "$WARNING" != "0" ] || [ ! -z "$SILENT" ]; then
-          # TODO: message should also work for noarch repositories
-          echo warning: no file list for $repository_name repository $repository_name on arch $ARCH version $VERSION
+          if [ "$repos_type" == "noarch" ]; then
+            message=""
+          else
+            message="on arch $ARCH version $VERSION"
+          fi
+          echo warning: no file list for $repository_name repository $repository_name $message
           echo please do a simplaret --update
         fi
       else
@@ -339,8 +343,7 @@ function simplaret_purge {
 
 function simplaret_get {
 
-  # TODO: with no parameters, update the existing packages at the local repo?
-  #       support to --get package-version-arch-build.tgz or just half the name
+  # TODO: support to --get package-version-arch-build.tgz or just part of the name
 
   # first search for an already downloaded package
   for repos_type in patches root repos noarch; do
@@ -397,6 +400,7 @@ function simplaret_get {
 function simplaret_get_patches {
 
   # TODO: new format
+  #       use /etc/simplepkg/jailist
 
   if [ ! -d "$PATCHES_DIR/$ARCH/$VERSION" ]; then
     mkdir -p $PATCHES_DIR/$ARCH/$VERSION
@@ -463,7 +467,6 @@ if [ -z "$1" ]; then
   simplaret_usage
   exit 1
 else
-  server="$1"
   eval_config `basename $0`
   simplaret_eval_config
 fi