mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 02:48:38 -04:00
Changing pi-gen build to use branch variable.
This commit is contained in:
parent
acf3dee179
commit
3d12c29cf2
2 changed files with 31 additions and 1 deletions
|
|
@ -12,6 +12,34 @@ if [ $EUID != 0 ]; then
|
|||
exit $?
|
||||
fi
|
||||
|
||||
Help() {
|
||||
# Display Help
|
||||
echo "Build WROLPi Raspberry Pi images"
|
||||
echo
|
||||
echo "Syntax: upgrade.sh [-h] [-b BRANCH]"
|
||||
echo "options:"
|
||||
echo "h Print this help."
|
||||
echo "b Build from this git BRANCH."
|
||||
echo
|
||||
}
|
||||
|
||||
BRANCH="master"
|
||||
while getopts ":hb:" option; do
|
||||
case $option in
|
||||
h) # display Help
|
||||
Help
|
||||
exit
|
||||
;;
|
||||
b)
|
||||
BRANCH="${OPTARG}"
|
||||
;;
|
||||
*) # invalid argument(s)
|
||||
echo "Error: Invalid option"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ ! -f "${SCRIPT_DIR}/stage2/04-wrolpi/files/gis-map.dump.gz" ]; then
|
||||
echo "stage2/04-wrolpi/files/gis-map.dump.gz does not exist!"
|
||||
exit 1
|
||||
|
|
@ -29,6 +57,7 @@ git clone --branch arm64 https://github.com/RPI-Distro/pi-gen.git "${BUILD_DIR}"
|
|||
|
||||
# Copy the configuration and build files into the pi-gen directory.
|
||||
cp "${SCRIPT_DIR}/config.txt" "${BUILD_DIR}/config.txt"
|
||||
echo "WROLPI_BRANCH=${BRANCH}" >> "${BUILD_DIR}/config.txt"
|
||||
rsync -a "${SCRIPT_DIR}"/stage2/* "${BUILD_DIR}/stage2/"
|
||||
|
||||
# We only need to build the Lite and Desktop images.
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@ sed -i 's/port = 5433/port = 5432/' /etc/postgresql/15/main/postgresql.conf
|
|||
npm i -g serve@12.0.1 single-file-cli@1.1.54 readability-extractor@0.0.6 carto@1.2.0
|
||||
|
||||
# Put the latest WROLPi master in /opt/wrolpi.
|
||||
git clone -b master https://github.com/lrnselfreliance/wrolpi.git /opt/wrolpi
|
||||
export WROLPI_BRANCH=${WROLPI_BRANCH:master}
|
||||
git clone -b ${WROLPI_BRANCH} https://github.com/lrnselfreliance/wrolpi.git /opt/wrolpi
|
||||
git config --global --add safe.directory /opt/wrolpi
|
||||
|
||||
# Install Python requirements.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue