Upgrade yt-dlp from version `stable@2024.05.27` to `stable@2024.07.09`
[sunny256-utils.git] / svn-po
blob3dbfb53bf447d7bba813e16948b467afe3e6255b
1 #!/usr/bin/env bash
3 #=======================================================================
4 # Do stuff with the .po files in Subversion.
5 # File ID: 3140ae52-a724-11de-a9b3-00248cd5cf1e
6 #=======================================================================
8 echo Kjører en forenkla greie.
9 cd ~/src/git/other/svn/ || { chdir: Funka ikke.; exit 1; }
10 [ -d .git/. ] || { echo Finner ikke .git/.; exit 1; }
11 [ "`pwd`" = "/home/sunny/src/git/other/svn" ] || { echo `pwd`: Er ikke riktig katalog.; exit 1; }
12 echo pwd = `pwd`
13 echo ===== git diff HEAD
14 git diff HEAD
15 echo -n Trykk Enter for å renske katalogen...
16 read
17 echo ===== git clean osv
18 git clean -fxd
19 git co -f
21 echo ===== git co master
22 git co master
23 echo ===== git svn rebase
24 git svn rebase
25 echo -n Trykk Enter...
26 read
27 echo ===== git co nb-po
28 git co nb-po
29 echo ===== git rebase master
30 git rebase master || { echo git rebase gikk på ræva, fiks opp i greiene.; exit 1; }
32 echo -n Trykk Enter hvis det ser OK ut...
33 read
34 ./autogen.sh
35 ./configure
36 make locale-gnu-po-update PO=nb
37 exit 0
39 if [ -d .svn/. ]; then
40 svnrev=`svnversion .|tr -d M`
41 else
42 svnrev=`git svn find-rev $(git show --format=format:%H | head -1)`
44 if [ -z "$svnrev" ]; then
45 svnrev=`date -u +"%Y%m%dT%H%M%SZ"`
47 if [ "$1" = "trunkmerge" ]; then
48 [ -e HACKING ] || { echo "Du må stå i toppen av arbeidskopien til 1.x.x eller 1.x.x ." >&2; exit 1; }
49 echo ======== svn update
50 svn up
51 cp -p subversion/po/nb.po subversion/po/.etter0_original
52 echo ======== ./configure, etc...
53 ./autogen.sh && ./configure --prefix=/usr/local/varprg/subversion-1.6.x.r$svnrev --enable-maintainer-mode --disable-shared --with-ssl && make locale-gnu-po-update PO=nb
54 cd subversion/po || { echo "cd subversion/po: Nehei." >&2; exit 1; }
55 cp -p nb.po .etter1_make
56 rm `ls | grep -v -e '^nb.po$' -e 'subversion.pot'`
57 svn up -r$svnrev
58 echo ======== po-merge.py
59 svn cat http://svn.collab.net/repos/svn/trunk/subversion/po/nb.po | po-merge.py nb.po
60 cp -p nb.po .etter2_po-merge
61 cd ../..
62 [ -e HACKING ] || { echo "I alle dager. Skulle liksom være tilbake på toppen av AK-en, men er visst ikke det." >&2; exit 1; }
63 echo ======== make locale-gnu-po-update PO=nb
64 make locale-gnu-po-update PO=nb
65 cd subversion/po || { echo "cd subversion/po: Nehei II." >&2; exit 1; }
66 rm `ls | grep -v -e '^nb.po$' -e 'subversion.pot'`
67 cp -p nb.po .etter3_make
68 echo ======== svn up -r$svnrev
69 svn up -r$svnrev
70 echo ======== msgfmt
71 msgfmt -cv nb.po
72 elif [ "$1" = "update" ]; then
73 ./autogen.sh && \
74 ./configure --prefix=/usr/local/varprg/subversion-trunk.r$svnrev \
75 --enable-maintainer-mode --disable-shared --with-ssl && \
76 make locale-gnu-po-update PO=nb
77 else
78 cat <<END
80 Syntax: svn-po [command]
82 Commands:
84 trunkmerge
85 Merge all new messages from trunk to the current branch.
86 update
87 Update subversion/po/nb.po .
89 END