diff options
-rwxr-xr-x | src/simplaret | 57 |
1 files changed, 32 insertions, 25 deletions
diff --git a/src/simplaret b/src/simplaret index dee5a36..8f8ceb6 100755 --- a/src/simplaret +++ b/src/simplaret @@ -179,6 +179,7 @@ function simplaret_repository_url { fi if [ "$repos_type" == "root" ]; then + simplaret_distro_folder repository_url="$repository_url/$DISTRO_FOLDER/$EXTRA_FOLDER" fi @@ -545,8 +546,8 @@ function simplaret_get_jail_patches { oldarch="$ARCH" oldversion="$VERSION" - VERSION="`default_version $root`" ARCH="`default_arch $root`" + VERSION="`default_version $root`" # we need to do that for each arch/version pairs simplaret_update @@ -653,6 +654,36 @@ function simplaret_install { } +function simplaret_distro_folder { + + # sets the distro folder + + if [ "$ARCH" == "i386" ]; then + DISTRO="slackware" + DISTRO_FOLDER="$DISTRO-$VERSION" + elif [ "$ARCH" == "x86_64" ]; then + # EXTRA_FOLDER="tree" + DISTRO="slamd64" + DISTRO_FOLDER="$DISTRO-$VERSION" + elif [ "$ARCH" == "s390" ]; then + DISTRO="slack390" + DISTRO_FOLDER="$DISTRO-$VERSION" + elif [ "$ARCH" == "x86_uclibc" ]; then + DISTRO="ucslack" + DISTRO_FOLDER="$DISTRO-$VERSION" + elif [ "$ARCH" == "arm" ]; then + DISTRO="armedslack" + DISTRO_FOLDER="$DISTRO-$VERSION" + elif [ "$ARCH" == "powerpc" ]; then + DISTRO="slackintosh" + DISTRO_FOLDER="$VERSION" + elif [ "$ARCH" == "sparc" ]; then + DISTRO="splack" + DISTRO_FOLDER="tree-$VERSION" + fi + +} + if [ -f "$COMMON" ]; then source $COMMON else @@ -680,30 +711,6 @@ if [ -z "$VERSION" ]; then VERSION="$DEFAULT_VERSION" fi -if [ "$ARCH" == "i386" ]; then - DISTRO="slackware" - DISTRO_FOLDER="$DISTRO-$VERSION" -elif [ "$ARCH" == "x86_64" ]; then - # EXTRA_FOLDER="tree" - DISTRO="slamd64" - DISTRO_FOLDER="$DISTRO-$VERSION" -elif [ "$ARCH" == "s390" ]; then - DISTRO="slack390" - DISTRO_FOLDER="$DISTRO-$VERSION" -elif [ "$ARCH" == "x86_uclibc" ]; then - DISTRO="ucslack" - DISTRO_FOLDER="$DISTRO-$VERSION" -elif [ "$ARCH" == "arm" ]; then - DISTRO="armedslack" - DISTRO_FOLDER="$DISTRO-$VERSION" -elif [ "$ARCH" == "powerpc" ]; then - DISTRO="slackintosh" - DISTRO_FOLDER="$VERSION" -elif [ "$ARCH" == "sparc" ]; then - DISTRO="splack" - DISTRO_FOLDER="tree-$VERSION" -fi - case $1 in "--update" | "update") simplaret_update ;; "--search" | "search") shift ; simplaret_search $* ;; |