Changeset 119890 in spip-zone


Ignore:
Timestamp:
Jan 21, 2020, 4:18:56 PM (5 weeks ago)
Author:
cedric@…
Message:

Ajout d'une option -t/--target pour definir le nom du repository cible (par defaut calcule d'apres la source)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _outils_/importToGitea/trunk/ImportOneRepository.sh

    r119788 r119890  
    1717    -o|--organization)
    1818    ORGANIZATION="$2"
     19    shift # past argument
     20    shift # past value
     21    ;;
     22    -t|--target)
     23    TARGET="$2"
    1924    shift # past argument
    2025    shift # past value
     
    8085fi
    8186
     87if [ -z "${TARGET}" ]; then
     88    TARGET=$(basename "$REPOSITORY")
     89fi
     90
    8291echo "$REPOSITORY will be import from svn following $MODEL to $ORGANIZATION"
    8392
    8493#Disting svn and git repository
    8594repository_svn="$REPOSITORY"
    86 repository_git=$(basename "$REPOSITORY")
     95repository_git="$TARGET"
    8796
    8897#Import svn to git
     
    132141rm -rf "$repo_source"
    133142
    134 chown "$GIT_UID:$GIT_GID" -R "$repo_target"
     143sudo chown "$GIT_UID:$GIT_GID" -R "$repo_target"
Note: See TracChangeset for help on using the changeset viewer.