-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmkprofile
More file actions
executable file
·28 lines (22 loc) · 846 Bytes
/
mkprofile
File metadata and controls
executable file
·28 lines (22 loc) · 846 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
#
# Utility to build a new profile.zip from the sources
# (TODO: this should become part of the Makefile)
# Clean up any editor backup files and the old zip file
rm -f profile.zip profile/*~ profile/*/*~ profile/*.bak profile/*/*.bak
# Fetch the new version number
v=`cat profile/version.txt`
echo "Version: $v"
# Update all the XML files first
for f in profile/nodedef/nodedefs.xml profile/editor/editors.xml; do
echo "Processing $f..."
sed -i -e 's/^<!-- Version .* -->$/<!-- Version '"$v"' -->/' $f
done
# And now handle all the NLS text files
for f in profile/nls/*.txt; do
echo "Processing $f..."
sed -i -e 's/^#-- Version .* --#$/#-- Version '"$v"' --#/' $f
done
# Finally, create the zip file that we'll need
echo "Creating profile.zip..."
cd profile && zip -r ../profile.zip editor nls nodedef version.txt