2015-05-03 13:13:38 -06:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
cd "$BUILDROOTBASE"
|
|
|
|
|
2016-10-24 14:28:36 -06:00
|
|
|
|
|
|
|
|
2015-05-03 13:13:38 -06:00
|
|
|
# Prep the feeds file
|
2016-10-24 14:28:36 -06:00
|
|
|
AREDN_PACKAGES_DIR=$(readlink -f "$BUILDROOTBASE/../aredn_packages")
|
|
|
|
|
|
|
|
if [ -n "$GERRIT_PROJECT" ] && [ "$GERRIT_PROJECT" = "aredn_packages" ]
|
|
|
|
then
|
|
|
|
# This is a Gerrit build for aredn_packages, lets run the single commit
|
|
|
|
echo "src-git arednpackages file://$AREDN_PACKAGES_DIR^$GERRIT_PATCHSET_REVISION" > feeds.conf
|
|
|
|
else
|
|
|
|
# If $GIT_BRANCH is set lets try and check locally to be sure the branch exists. If we haven't checked out aredn_packages
|
|
|
|
# locally then lets assume this may not be in the build environment and fall back to some sane defaults.
|
|
|
|
if [ -n "$GIT_BRANCH" ] && [ -d "$AREDN_PACKAGES_DIR" ] && [ -n "$(git --git-dir="$AREDN_PACKAGES_DIR/.git" branch --list -r "$GIT_BRANCH")" ]
|
|
|
|
then
|
|
|
|
BASE_BRANCH="$GIT_BRANCH"
|
|
|
|
else
|
|
|
|
case $GIT_BRANCH in
|
|
|
|
origin/release-* ) BASE_BRANCH="origin/master";;
|
|
|
|
origin/hotfix-* ) BASE_BRANCH="origin/master";;
|
|
|
|
origin/master ) BASE_BRANCH="origin/master";;
|
|
|
|
* ) BASE_BRANCH="origin/develop";;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
echo "src-git arednpackages git://git.aredn.org/aredn_packages;$BASE_BRANCH" > feeds.conf
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2015-05-03 13:13:38 -06:00
|
|
|
cat feeds.conf.default >> feeds.conf
|
|
|
|
./scripts/feeds update -a
|
|
|
|
./scripts/feeds install -p arednpackages olsrd
|
|
|
|
./scripts/feeds install perl
|
|
|
|
./scripts/feeds install -p arednpackages vtun
|
2015-07-30 11:28:13 -06:00
|
|
|
./scripts/feeds install -a -p arednpackages
|
2015-05-03 13:13:38 -06:00
|
|
|
./scripts/feeds install snmpd
|
2015-06-18 22:54:30 -06:00
|
|
|
./scripts/feeds install ntpclient
|
2016-05-30 12:16:02 -06:00
|
|
|
./scripts/feeds install socat
|
|
|
|
./scripts/feeds install xinetd
|
2016-07-18 21:33:11 -06:00
|
|
|
./scripts/feeds install luci-base
|
|
|
|
./scripts/feeds install luci-lib-nixio
|
|
|
|
./scripts/feeds install luci-lib-ip
|
|
|
|
./scripts/feeds install luci-lib-jsonc
|
2015-05-03 13:13:38 -06:00
|
|
|
|
|
|
|
SHORT_COMMIT=$(echo "$GIT_COMMIT" | awk '{ string=substr($0, 1, 8); print string; }' )
|
|
|
|
SHORT_BRANCH=$(echo "$GIT_BRANCH" | awk 'match($0,"/"){print substr($0,RSTART+1)}')
|
|
|
|
|
2016-05-29 23:04:59 -06:00
|
|
|
if [ ! -z "$BUILD_SET_VERSION" ]; then
|
2015-05-03 13:13:38 -06:00
|
|
|
echo "$BUILD_SET_VERSION" > "$BUILDROOTBASE/files/etc/mesh-release"
|
|
|
|
else
|
|
|
|
echo "${SHORT_BRANCH}-${BUILD_NUMBER}-${SHORT_COMMIT}" > "$BUILDROOTBASE/files/etc/mesh-release"
|
|
|
|
fi
|