Skip to content

Commit 8fd4b0c

Browse files
committed
Move readConfig into freenet-scripts-common
All "source freenet-scripts-common" were followed with readConfig.
1 parent 7fc95a3 commit 8fd4b0c

17 files changed

+35
-36
lines changed

compare-l10n

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
#!/bin/bash
22

3-
# Shared default configuration and utility functions.
3+
# Load configuration and utility functions.
44
source freenet-scripts-common || exit
55

6-
readConfig
7-
86
buildDir=$(mktemp -d)
97
git clone "$fredDir" "$buildDir" || exit 1
108
compareL10n "$1"

deploy-website

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
set -o errexit
33

4-
# Shared default configuration and utility functions.
4+
# Load configuration and utility functions.
55
source freenet-scripts-common || exit
66

77
cd $(dirname $0)
@@ -96,8 +96,6 @@ do
9696
esac
9797
done
9898

99-
readConfig
100-
10199
if $testing; then
102100
websiteDir="$websiteStagingDir"
103101
else

freenet-scripts-common

+2
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,5 @@ function makeBuildDir {
9393

9494
trap rmTemp EXIT
9595
}
96+
97+
readConfig

insert-update

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# User should put the real keys in $insertKeys (see ~/.freenetrc)
33
# Format of keys file: NEWKEY=[SSK private URI]
44
# We used to also include OLDKEY, but this is not used any more, since the transition version is the last build inserted on the old key and the first inserted on the new key.
5-
# Load the shared utility functions.
5+
6+
# Load configuration and utility functions.
67
source freenet-scripts-common || exit
7-
readConfig
88

99
SEEDNODESFILE="$releaseDir/seednodes.fref"
1010

reinsert-plugin

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
PLUGIN=$1
33
if [[ $PLUGIN == "WoT" ]]; then PLUGIN=WebOfTrust; fi
44
TEMPLOC=`mktemp -d`
5-
# Shared default configuration and utility functions.
5+
6+
# Load configuration and utility functions.
67
source freenet-scripts-common || exit
7-
readConfig
8+
89
JARNAME=`echo $PLUGIN | cut -d "_" -f 1`
910
(echo ClientHello; echo Name=Toad-update-${PLUGIN}; echo ExpectedVersion=2; echo End; echo ClientPut; echo "URI=CHK@"; echo "Identifier=${PLUGIN}.jar"; echo Verbosity=1023; echo MaxRetries=-1; echo UploadFrom=disk; echo "Filename=/usr/src/cvs/eclipse-workspace/app-wininstaller/bin/${PLUGIN}.jar"; echo "TargetFilename=${PLUGIN}.jar"; echo Persistence=forever; echo PriorityClass=2; echo Global=true; echo End) > $TEMPLOC/upload
1011
cat $TEMPLOC/upload | nc 127.0.0.1 9481

release-build

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
# Usage is "release-build 9999" for build 9999.
55
# TODO Add --help etc.
66
# TODO Add --snapshot to proxy to release-fred --snapshot ???
7+
8+
# Load configuration and utility functions.
9+
source freenet-scripts-common || exit
10+
711
BUILD=$1
8-
source freenet-scripts-common || exit 1
9-
readConfig || exit 1
1012

1113
# Set up agents at the beginning of this script, but not the individual scripts.
1214
# TODO We could put this in freenet-scripts-common but only if it doesn't get re-run in every script we call.

release-fred

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# these variables are probably different for everybody
55
# so create $HOME/.freenetrc and override those with your desired values.
66

7-
# Shared default configuration and utility functions.
7+
# Load configuration and utility functions.
88
source freenet-scripts-common || exit
99

1010
# What to build / release. Possible values: "build", "snapshot"
@@ -63,8 +63,6 @@ EOF
6363
esac
6464
done
6565

66-
readConfig
67-
6866
# Target should be set.
6967
if [[ -z "$target" ]]; then
7068
echo "Target not set. Please specify --build or --snapshot."

release-installer

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#!/bin/bash
2-
# Shared default configuration and utility functions.
3-
source freenet-scripts-common || exit 1
4-
readConfig || exit 2
2+
3+
# Load configuration and utility functions.
4+
source freenet-scripts-common || exit
5+
56
getBuildInfo
67
if [[ -z "$gitVersion" ]]; then echo Could not get git version; exit 4; fi
78
echo Version is $buildNumber

release-plugin

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
# it to a CHK with the node on port 9481.
66
#
77

8-
# Shared default configuration and utility functions.
8+
# Load configuration and utility functions.
99
source freenet-scripts-common || exit
10-
readConfig
1110

1211
if [[ -z "$1" ]]; then
1312
cat <<EOF Usage: $0 [plugin name]

release-wininstaller

+1-3
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
# Release:
4141
# rsync
4242

43-
# Shared default configuration and utility functions.
43+
# Load configuration and utility functions.
4444
source freenet-scripts-common || exit
4545

4646
# Whether to exit before releasing.
@@ -117,8 +117,6 @@ EOF
117117
esac
118118
done
119119

120-
readConfig
121-
122120
# Make temporary build directory to hold installer source, dependencies,
123121
# and Wine prefix. This will be wiped on exit.
124122
makeBuildDir

remote-deploy-website

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33

44
# Deploy the website on the webserver using locally-reviewed commit IDs.
55

6-
source freenet-scripts-common
7-
readConfig
6+
# Load configuration and utility functions.
7+
source freenet-scripts-common || exit
8+
89
getBuildInfo
910
websiteID=$(cd "$websiteOfficialDir"; git rev-parse --verify master)
1011

setup-release-environment

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

3+
# Load configuration and utility functions.
34
source freenet-scripts-common || exit
4-
readConfig || exit
55

66
# Packages on Debian Wheezy
77
# For building Java: openjdk-6-jdk ant

tag-build

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#!/bin/bash
22
# Requires remotes: "origin" = fred-staging, "stable" = fred-official
33
# TODO Test for this?
4+
5+
# Load configuration and utility functions.
46
source freenet-scripts-common || exit
5-
readConfig || exit
67

78
cd "$fredDir"
89

transifex-pull

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/bin/bash
2+
set -o errexit
3+
24
# Pull translation updates from Tranfiex.
35
# Even in developer mode the Transifex Client (https://github.com/transifex/transifex-client)
46
# includes commented-out untranslated lines, which is not suitable for committing.
@@ -13,9 +15,8 @@
1315
# See http://support.transifex.com/customer/portal/articles/996071-setup-and-sync-with-tx
1416
# for details.
1517

16-
set -o errexit
17-
source freenet-scripts-common
18-
readConfig
18+
# Load configuration and utility functions.
19+
source freenet-scripts-common || exit
1920

2021
# TODO: Move to freenet-scripts-common?
2122
starting_directory="$(readlink -e "$(dirname "$0")")"

update-bookmarks

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
22
set -o errexit
33

4-
source freenet-scripts-common
5-
readConfig
4+
# Load configuration and utility functions.
5+
source freenet-scripts-common || exit
66

77
bookmarkPath="$fredDir/src/freenet/clients/http/staticfiles/defaultbookmarks.dat"
88

update-version

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
22
set -o errexit
33

4-
source freenet-scripts-common
5-
readConfig
4+
# Load configuration and utility functions.
5+
source freenet-scripts-common || exit
66

77
versionPath="$fredDir/src/freenet/node/Version.java"
88

verify-build

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
# Uses lib-pyFreenet to fetch the in-Freenet JAR over FCP,
66
# and so requires Python and lib-pyFreenet. (fcpget)
77

8-
# Shared default configuration and utility functions.
8+
# Load configuration and utility functions.
99
source freenet-scripts-common || exit
10-
readConfig
1110

1211
## TODO MAJOR: Get the latest build number from somewhere other than the repository, e.g. Freenet, announcements, etc.
1312
## TODO MAJOR: Verify the installers

0 commit comments

Comments
 (0)