Commit initial: récupération et tri rapide
This commit is contained in:
commit
a52829f96c
104 changed files with 11892 additions and 0 deletions
38
script_creation-depot-svn.sh
Executable file
38
script_creation-depot-svn.sh
Executable file
|
@ -0,0 +1,38 @@
|
|||
#!/bin/sh
|
||||
|
||||
BASE_DIR=/var/subversion
|
||||
NOM_DEPOT="$1"
|
||||
|
||||
# Tous les traitements se font en ASCII pur
|
||||
OLD_LC_ALL="$LC_ALL"
|
||||
export LC_ALL=C
|
||||
export LANG=C
|
||||
|
||||
while [ $( printf "$NOM_DEPOT" | egrep -c "^[a-zA-Z0-9-]+$" ) -ne 1 ]; do
|
||||
if [ "$NOM_DEPOT" != "" ]; then
|
||||
echo "ERREUR: nom de projet non-valide, veuillez n'utiliser que l'ensemble de caractères [a-zA-Z0-9-]." >&2
|
||||
echo
|
||||
fi
|
||||
echo "Veuillez entrer le nom de votre dépôt (Ctrl+c pour annuler) :"
|
||||
read NOM_DEPOT
|
||||
done
|
||||
|
||||
if [ -d "$BASE_DIR/$NOM_DEPOT" ]; then
|
||||
echo "ERREUR: depot deja existant." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Remise en place des valeurs "locales"
|
||||
export LC_ALL="$OLD_LC_ALL"
|
||||
export LANG="$OLD_LC_ALL"
|
||||
|
||||
# Création du dépôt vide
|
||||
cd "$BASE_DIR"
|
||||
svnadmin create "$NOM_DEPOT"
|
||||
|
||||
# Arborescence trunk, tags, branches
|
||||
svn -m "Structure initiale." mkdir "file://$BASE_DIR/$NOM_DEPOT/trunk" "file://$BASE_DIR/$NOM_DEPOT/tags" "file://$BASE_DIR/$NOM_DEPOT/branches" "file://$BASE_DIR/$NOM_DEPOT/doc"
|
||||
|
||||
# Attribution à l'utilisateur www-data pour permettre à Apache de le gérer
|
||||
chown -R www-data:www-data "$NOM_DEPOT"
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue