[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

`svn-tr' betigi hazir



Merhaba,

Ceviri-NASIL'da bahsi gecen `svn-tr' betigini ancak simdi yazabildim, 
ekte gonderiyorum.  Betigi `chmod a+x' ile  $PATH icinde bir yere 
yerlestirin ve yardim icin komutu bosta calistirin:

	svn-tr

-- 
roktas
#!/bin/sh
#
# Subversion wrapper to access l10n-turkish repos on Alioth.
# Copyright (C) 2004  Recai Oktas <roktas@omu.edu.tr>
#
# Licensed under the GNU General Public License, version 2.
# See the file `http://www.gnu.org/copyleft/gpl.txt'.
#
# Last modified: Wed, 28 Jan 2004 00:12:52 +0200

set -e

#ALIOTH_USER=${USER}-guest
HOST=alioth.debian.org
REPOS=/org/alioth.debian.org/chroot/home/groups/l10n-turkish/svn
SVN_URL="svn+ssh://${HOST}:${REPOS}"

cat >&2 <<EOF
Subversion l10n-turkish depo erisim araci.
Yardim icin komutu bosta calistirin.
Hatalar icin Recai Oktas <roktas@omu.edu.tr>

EOF

if [ -z "`which svn`" ]; then
	cat >&2 <<EOF
	
Subversion kurulu gozukmuyor.

	\`unstable' icin:
		apt-get install subversion

	\`woody' icin:
		- Su satiri \`/etc/apt/sources.list'e ekleyin:
			deb http://people.debian.org/~cjwatson/subversion-woody ./
		
		- apt-get update & apt-get install subversion

EOF

	exit 1
fi

if [ -z "$1" ]; then
	cat >&2 <<EOF
Bu betik \`svn' istemcisinin kolay kullanimi icin hazirlanmis bir aractir.
Komut satiri secenekleri \`svn' ile aynidir.  Tek bir farkla: Alioth
depo URL icin "ne yazacaktim?" diye arastirmaniza gerek birakmayacak bir
sentaks kullanabiliyorsunuz:

	export SVN_SSH="ssh -l falanca-guest"
	svn komut URL...

yerine

	$0 komut <l10n-tr modulu>://<alt modul>

Ornekler:

	$0 co po-debconf://adduser
		Depodan \`adduser' paketinin po-debconf dosyalarini getir.
	
	$0 co debian-installer://anna
		Depodan debian-installer'a ait \`anna' modulunu getir.
	
	$0 co ://
		Butun trunk'i getir.
	
	$0 co /://
		Butun depoyu getir.
	
	$0 ci
		Degisiklikleri depoya gonder.
	
	$0 co branches/po://dpkg
		Depo dallarindan \`dpkg' paketine ait po dosyalarini getir.
EOF
	exit 0
fi

args_svn=""
for arg; do
	if echo "$arg" | grep -q '://'; then
		module=`echo $arg | awk -F '://' '{ print $1 }'`
		submodule=`echo $arg | awk -F '://' '{ print $2 }'`

		if [ -z "$module" ]; then
			module="trunk"
		elif echo "$module" | grep -q '/'; then
			module=`echo $module | sed -e 's#^[/]*##' -e 's#[/]*$##'`
		else
			module="trunk/$module"
		fi

		dir=${module}/${submodule}

		if [ "$dir" = "/" ]; then
			echo >&2 "Hmmm, hepsi isteniyor..."
		elif [ "$dir" = "trunk/" ]; then
			echo >&2 "Hmmm, butun \`trunk' isteniyor..."
		fi

		this_arg=${SVN_URL}/${dir}
	else
		this_arg="$arg"
	fi
	args_svn="$args_svn $this_arg"

	shift
done

user=$ALIOTH_USER
if [ -z "$user" ]; then
	echo -n "Alioth kullanici isminiz [${USER}-guest]: "; read user || true

	if [ -z "$user" ]; then
		cat >&2 <<EOF
Her seferinde sorulmamasi icin kullanici isminizi ALIOTH_USER cevre
degiskeniyle bildirebilirsiniz.  Or:

	~/.bashrc dosyasinda \`export ALIOTH_USER=kullanici_ismi'

EOF
		user=${USER}-guest
	fi
fi

echo >&2 "===> svn $args_svn"

export SVN_SSH="ssh -l $user"
eval svn "$args_svn"

Reply to: