ths-scripts/checkout

59 líneas
2.0 KiB
Plaintext

2023-02-25 16:27:22 +00:00
#!/bin/bash -e
2014-03-23 17:56:13 +00:00
# Copyright (C) 2009 Andrius Štikonas <andrius@stikonas.eu>
2009-03-16 20:12:24 +00:00
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
source "`dirname $0`/ths-variables"
2009-03-16 20:12:24 +00:00
2014-11-21 21:12:46 +00:00
if [ ! -f ".ths" ]; then
echo "Please enter your language code (Default: lt):"
2023-02-25 16:27:22 +00:00
read -r lcode
2014-11-21 21:12:46 +00:00
if [ ! "$lcode" ]; then
lcode="lt"
2009-03-16 20:12:24 +00:00
fi
2014-11-21 21:12:46 +00:00
echo lcode="$lcode" >> ".ths"
2009-03-16 20:12:24 +00:00
while [ ! "$svnwrite" = "n" ] && [ ! "$svnwrite" = "y" ]; do
2014-11-21 21:12:46 +00:00
echo "Do you have write access to KDE svn repository? [y/N]"
2023-02-25 16:27:22 +00:00
read -r svnwrite
svnwrite=$(echo $svnwrite | tr YN yn)
if [ ! "$svnwrite" ]; then
2014-11-21 21:12:46 +00:00
svnwrite="n"
fi
2009-03-16 20:12:24 +00:00
done
2014-11-21 21:12:46 +00:00
echo svnwrite="$svnwrite" >> ".ths"
2009-03-16 20:12:24 +00:00
# Checkout repositories.
2024-01-18 23:37:49 +00:00
mkdir trunk-kf6 stable-kf6
2009-03-16 20:12:24 +00:00
if [ "$svnwrite" = "y" ]; then
2024-01-18 23:37:49 +00:00
cd trunk-kf6
svn co svn+ssh://svn@svn.kde.org/home/kde/trunk/l10n-kf6/templates
svn co svn+ssh://svn@svn.kde.org/home/kde/trunk/l10n-kf6/$lcode
cd ../stable-kf6
svn co svn+ssh://svn@svn.kde.org/home/kde/branches/stable/l10n-kf6/templates
svn co svn+ssh://svn@svn.kde.org/home/kde/branches/stable/l10n-kf6/$lcode
2009-03-16 20:12:24 +00:00
else
2024-01-18 23:37:49 +00:00
svn co svn://anonsvn.kde.org/home/kde/trunk/l10n-kf6/templates
svn co svn://anonsvn.kde.org/home/kde/trunk/l10n-kf6/$lcode
svn co svn://anonsvn.kde.org/home/kde/branches/stable/l10n-kf6/templates
svn co svn://anonsvn.kde.org/home/kde/branches/stable/l10n-kf6/$lcode
2009-03-16 20:12:24 +00:00
fi
else
2014-11-21 21:12:46 +00:00
source ".ths"
2024-01-18 23:37:49 +00:00
svn up trunk-kf6/templates
svn up trunk-kf6/$lcode
svn up stable-kf6/templates
svn up stable-kf6/$lcode
2009-03-16 20:12:24 +00:00
fi