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`"
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
function simplaret_search {
- local priority
+ local priority message
for repos_type in patches root repos noarch; do
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
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
function simplaret_get_patches {
# TODO: new format
+ # use /etc/simplepkg/jailist
if [ ! -d "$PATCHES_DIR/$ARCH/$VERSION" ]; then
mkdir -p $PATCHES_DIR/$ARCH/$VERSION
simplaret_usage
exit 1
else
- server="$1"
eval_config `basename $0`
simplaret_eval_config
fi