Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mahara-scripts
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
mahara
mahara-scripts
Commits
022f09db
Commit
022f09db
authored
Jun 02, 2011
by
Richard Mansfield
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Push pot template updates to launchpad
parent
ae6c1c88
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
10 deletions
+27
-10
debian/control
debian/control
+1
-1
mahara-langpacks/update-pot.sh
mahara-langpacks/update-pot.sh
+26
-9
No files found.
debian/control
View file @
022f09db
...
...
@@ -7,7 +7,7 @@ Standards-Version: 3.9.1
Package: custom-site-mahara-langpacks
Architecture: all
Depends: ${misc:Depends}, apache2, php5-cli, perl, bash, debconf, git-core, libhtml-tiny-perl, liblocale-po-perl, libwww-perl
Depends: ${misc:Depends}, apache2, php5-cli, perl, bash, debconf, git-core, libhtml-tiny-perl, liblocale-po-perl, libwww-perl
, bzr
Description: Mahara langpack repository scripts
Scripts to download mahara langpacks from gitorious, clean them up, and
make them available for HTTP download.
mahara-langpacks/update-pot.sh
View file @
022f09db
...
...
@@ -18,20 +18,22 @@ fi
WORK
=
${
DATA
}
/templates
GITDIR
=
${
WORK
}
/git
TEMP
=
${
WORK
}
/temp
OUT
=
${
DATA
}
/po
[
!
-d
${
WORK
}
]
&&
mkdir
${
WORK
}
[
!
-d
${
TEMP
}
]
&&
mkdir
${
TEMP
}
[
!
-d
${
OUT
}
]
&&
mkdir
${
OUT
}
[
!
-d
${
DOCROOT
}
/pot
]
&&
mkdir
${
DOCROOT
}
/pot
remote
=
'git://gitorious.org/mahara/mahara.git'
mahara
remote
=
'git://gitorious.org/mahara/mahara.git'
if
[
!
-d
${
GITDIR
}
]
;
then
echo
"git clone
${
remote
}
${
GITDIR
}
"
git clone
--quiet
${
remote
}
${
GITDIR
}
echo
"git clone
${
mahara
remote
}
${
GITDIR
}
"
git clone
--quiet
${
mahara
remote
}
${
GITDIR
}
fi
[
!
-d
"
${
WORK
}
/mahara-lang-bzr"
]
&&
bzr init-repo
${
WORK
}
/mahara-lang-bzr
BZR
=
${
WORK
}
/mahara-lang-bzr
cd
${
GITDIR
}
git fetch
--quiet
origin
...
...
@@ -86,8 +88,9 @@ for branch in ${branches} ; do
continue
fi
[
!
-d
${
OUT
}
/
${
branch
}
]
&&
mkdir
${
OUT
}
/
${
branch
}
outputdir
=
${
OUT
}
/
${
branch
}
/mahara
# Output into a copy of the launchpad mahara-lang repo
[
!
-d
${
BZR
}
/
${
branch
}
]
&&
bzr branch lp:~mahara-core/mahara-lang/
${
branch
}
${
BZR
}
/
${
branch
}
outputdir
=
${
BZR
}
/
${
branch
}
/mahara
[
!
-d
${
outputdir
}
]
&&
mkdir
${
outputdir
}
outputfile
=
${
outputdir
}
/mahara.pot
...
...
@@ -97,8 +100,22 @@ for branch in ${branches} ; do
/usr/bin/php
${
SCRIPTS
}
/php-po.php
${
langpack
}
${
langpack
}
${
outputfile
}
if
[
-f
${
outputfile
}
]
;
then
cd
${
OUT
}
/
${
branch
}
tar
zcf
${
DOCROOT
}
/pot/
${
branch
}
.tar.gz mahara/mahara.pot
cd
${
BZR
}
/
${
branch
}
diffs
=
`
bzr diff mahara/mahara.pot
`
if
[
!
-z
"
${
diffs
}
"
]
;
then
# Update copy of template in webroot
tar
zcf
${
DOCROOT
}
/pot/
${
branch
}
.tar.gz mahara/mahara.pot
# Push template to lp:mahara-lang
bzr add mahara/mahara.pot
bzr commit
-m
"Update template to
${
remotecommit
}
"
bzr push lp:~mahara-core/mahara-lang/
${
branch
}
fi
cd
${
GITDIR
}
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment