#!/bin/sh
# generated for network 'ejbw' @Fri Mar  3 20:46:46 CET 2023 from ./generate_table.sh
#
# firmware updatemodes:
# - stable..............: r44150
# - beta................: r49276
# - testing/avantgarde..: r4283 (LEDE)
#
# prepare your env with e.g.:
# export PATH="$PATH:~"
# MY_BUILD_DIR=mybuildbot
# sudo mount -t tmpfs -o size=90% none "$PWD/$MY_BUILD_DIR"
# mkdir -p $MY_BUILD_DIR && cd $MY_BUILD_DIR
#
# URL='https://raw.githubusercontent.com/bittorf/kalua/master/openwrt-build/build.sh'
# wget -O build.sh "$URL" && chmod +x build.sh
# ./build.sh --openwrt trunk --download_pool $HOME/openwrt_dl
# ./build.sh --openwrt lede  --download_pool $HOME/openwrt_dl
# scp mysettings /tmp/apply_profile.code.definitions
# scp your_sign_keys .
#
# and copy your public ssh-key (for autouploading files) to: root@intercity-vpn.de
# and execute this script:

export FAILED=

s1() {		# wifimac: 28ee52d51d97
	echo; echo '=== next_image: s1 ==='; echo

	cd 'openwrt' && git checkout 'master' && test -e '.config' && rm -fR bin/ && make clean || true && \
	../build.sh \
		--buildid 'firmware@bittorf-wireless.com' \
		--openwrt r44150 --feedstime '2015-01-25 23:40' \
		--hardware 'TP-LINK Archer C6U' --usecase 'Standard,kalua' \
		--release stable 'root@intercity-vpn.de:/var/www/networks/ejbw' || FAILED="$FAILED s1"
	git stash; test -e 'LICENSE' && cd ..
}

b1() {		# wifimac: 28ee52d51d97
	echo; echo '=== next_image: b1 ==='; echo

	cd 'openwrt' && git checkout 'master' && test -e '.config' && rm -fR bin/ && make clean || true && \
	../build.sh \
		--buildid 'firmware@bittorf-wireless.com' \
		--openwrt r49276 --feedstime '2016-04-30 16:54' \
		--hardware 'TP-LINK Archer C6U' --usecase 'Standard,kalua' \
		--release beta 'root@intercity-vpn.de:/var/www/networks/ejbw' || FAILED="$FAILED b1"
	git stash; test -e 'LICENSE' && cd ..
}

t1() {		# wifimac: 28ee52d51d97
	echo; echo '=== next_image: t1 ==='; echo

	cd 'source' && git checkout 'master' && test -e '.config' && rm -fR bin/ && make clean || true && \
	../build.sh \
		--buildid 'firmware@bittorf-wireless.com' \
		--openwrt r4283 \
		--hardware 'TP-LINK Archer C6U' --usecase 'Standard,kalua' \
		--release testing 'root@intercity-vpn.de:/var/www/networks/ejbw' || FAILED="$FAILED t1"
	git stash; test -e 'LICENSE' && cd ..
}

n1() {		# wifimac: 28ee52d51d97
	echo; echo '=== next_image: n1 ==='; echo

	cd 'source' && git checkout 'master' && test -e '.config' && rm -fR bin/ && make clean || true && \
	../build.sh \
		--buildid 'firmware@bittorf-wireless.com' \
		--openwrt r$1 \
		--hardware 'TP-LINK Archer C6U' --usecase 'Standard,kalua' \
		--release nightly 'root@intercity-vpn.de:/var/www/networks/ejbw' || FAILED="$FAILED n1"
	git stash; test -e 'LICENSE' && cd ..
}

s2() {		# wifimac: 54e6fcdc9618
	echo; echo '=== next_image: s2 ==='; echo

	cd 'openwrt' && git checkout 'master' && test -e '.config' && rm -fR bin/ && make clean || true && \
	../build.sh \
		--buildid 'firmware@bittorf-wireless.com' \
		--openwrt r44150 --feedstime '2015-01-25 23:40' \
		--hardware 'TP-LINK TL-WR1043ND' --usecase 'Standard,VDS,kalua' \
		--release stable 'root@intercity-vpn.de:/var/www/networks/ejbw' || FAILED="$FAILED s2"
	git stash; test -e 'LICENSE' && cd ..
}

b2() {		# wifimac: 54e6fcdc9618
	echo; echo '=== next_image: b2 ==='; echo

	cd 'openwrt' && git checkout 'master' && test -e '.config' && rm -fR bin/ && make clean || true && \
	../build.sh \
		--buildid 'firmware@bittorf-wireless.com' \
		--openwrt r49276 --feedstime '2016-04-30 16:54' \
		--hardware 'TP-LINK TL-WR1043ND' --usecase 'Standard,VDS,kalua' \
		--release beta 'root@intercity-vpn.de:/var/www/networks/ejbw' || FAILED="$FAILED b2"
	git stash; test -e 'LICENSE' && cd ..
}

t2() {		# wifimac: 54e6fcdc9618
	echo; echo '=== next_image: t2 ==='; echo

	cd 'source' && git checkout 'master' && test -e '.config' && rm -fR bin/ && make clean || true && \
	../build.sh \
		--buildid 'firmware@bittorf-wireless.com' \
		--openwrt r4283 \
		--hardware 'TP-LINK TL-WR1043ND' --usecase 'Standard,VDS,kalua' \
		--release testing 'root@intercity-vpn.de:/var/www/networks/ejbw' || FAILED="$FAILED t2"
	git stash; test -e 'LICENSE' && cd ..
}

n2() {		# wifimac: 54e6fcdc9618
	echo; echo '=== next_image: n2 ==='; echo

	cd 'source' && git checkout 'master' && test -e '.config' && rm -fR bin/ && make clean || true && \
	../build.sh \
		--buildid 'firmware@bittorf-wireless.com' \
		--openwrt r$1 \
		--hardware 'TP-LINK TL-WR1043ND' --usecase 'Standard,VDS,kalua' \
		--release nightly 'root@intercity-vpn.de:/var/www/networks/ejbw' || FAILED="$FAILED n2"
	git stash; test -e 'LICENSE' && cd ..
}

s3() {		# wifimac: 6466b3f66159
	echo; echo '=== next_image: s3 ==='; echo

	cd 'openwrt' && git checkout 'master' && test -e '.config' && rm -fR bin/ && make clean || true && \
	../build.sh \
		--buildid 'firmware@bittorf-wireless.com' \
		--openwrt r44150 --feedstime '2015-01-25 23:40' \
		--hardware 'TP-LINK TL-WDR4900 v1' --usecase 'Standard,kalua' \
		--release stable 'root@intercity-vpn.de:/var/www/networks/ejbw' || FAILED="$FAILED s3"
	git stash; test -e 'LICENSE' && cd ..
}

b3() {		# wifimac: 6466b3f66159
	echo; echo '=== next_image: b3 ==='; echo

	cd 'openwrt' && git checkout 'master' && test -e '.config' && rm -fR bin/ && make clean || true && \
	../build.sh \
		--buildid 'firmware@bittorf-wireless.com' \
		--openwrt r49276 --feedstime '2016-04-30 16:54' \
		--hardware 'TP-LINK TL-WDR4900 v1' --usecase 'Standard,kalua' \
		--release beta 'root@intercity-vpn.de:/var/www/networks/ejbw' || FAILED="$FAILED b3"
	git stash; test -e 'LICENSE' && cd ..
}

t3() {		# wifimac: 6466b3f66159
	echo; echo '=== next_image: t3 ==='; echo

	cd 'source' && git checkout 'master' && test -e '.config' && rm -fR bin/ && make clean || true && \
	../build.sh \
		--buildid 'firmware@bittorf-wireless.com' \
		--openwrt r4283 \
		--hardware 'TP-LINK TL-WDR4900 v1' --usecase 'Standard,kalua' \
		--release testing 'root@intercity-vpn.de:/var/www/networks/ejbw' || FAILED="$FAILED t3"
	git stash; test -e 'LICENSE' && cd ..
}

n3() {		# wifimac: 6466b3f66159
	echo; echo '=== next_image: n3 ==='; echo

	cd 'source' && git checkout 'master' && test -e '.config' && rm -fR bin/ && make clean || true && \
	../build.sh \
		--buildid 'firmware@bittorf-wireless.com' \
		--openwrt r$1 \
		--hardware 'TP-LINK TL-WDR4900 v1' --usecase 'Standard,kalua' \
		--release nightly 'root@intercity-vpn.de:/var/www/networks/ejbw' || FAILED="$FAILED n3"
	git stash; test -e 'LICENSE' && cd ..
}

s4() {		# wifimac: 940c6dfe470a
	echo; echo '=== next_image: s4 ==='; echo

	cd 'openwrt' && git checkout 'master' && test -e '.config' && rm -fR bin/ && make clean || true && \
	../build.sh \
		--buildid 'firmware@bittorf-wireless.com' \
		--openwrt r44150 --feedstime '2015-01-25 23:40' \
		--hardware 'TP-LINK TL-WR1043ND' --usecase 'Standard,kalua' \
		--release stable 'root@intercity-vpn.de:/var/www/networks/ejbw' || FAILED="$FAILED s4"
	git stash; test -e 'LICENSE' && cd ..
}

b4() {		# wifimac: 940c6dfe470a
	echo; echo '=== next_image: b4 ==='; echo

	cd 'openwrt' && git checkout 'master' && test -e '.config' && rm -fR bin/ && make clean || true && \
	../build.sh \
		--buildid 'firmware@bittorf-wireless.com' \
		--openwrt r49276 --feedstime '2016-04-30 16:54' \
		--hardware 'TP-LINK TL-WR1043ND' --usecase 'Standard,kalua' \
		--release beta 'root@intercity-vpn.de:/var/www/networks/ejbw' || FAILED="$FAILED b4"
	git stash; test -e 'LICENSE' && cd ..
}

t4() {		# wifimac: 940c6dfe470a
	echo; echo '=== next_image: t4 ==='; echo

	cd 'source' && git checkout 'master' && test -e '.config' && rm -fR bin/ && make clean || true && \
	../build.sh \
		--buildid 'firmware@bittorf-wireless.com' \
		--openwrt r4283 \
		--hardware 'TP-LINK TL-WR1043ND' --usecase 'Standard,kalua' \
		--release testing 'root@intercity-vpn.de:/var/www/networks/ejbw' || FAILED="$FAILED t4"
	git stash; test -e 'LICENSE' && cd ..
}

n4() {		# wifimac: 940c6dfe470a
	echo; echo '=== next_image: n4 ==='; echo

	cd 'source' && git checkout 'master' && test -e '.config' && rm -fR bin/ && make clean || true && \
	../build.sh \
		--buildid 'firmware@bittorf-wireless.com' \
		--openwrt r$1 \
		--hardware 'TP-LINK TL-WR1043ND' --usecase 'Standard,kalua' \
		--release nightly 'root@intercity-vpn.de:/var/www/networks/ejbw' || FAILED="$FAILED n4"
	git stash; test -e 'LICENSE' && cd ..
}

s5() {		# wifimac: 98dac4ea93ae
	echo; echo '=== next_image: s5 ==='; echo

	cd 'openwrt' && git checkout 'master' && test -e '.config' && rm -fR bin/ && make clean || true && \
	../build.sh \
		--buildid 'firmware@bittorf-wireless.com' \
		--openwrt r44150 --feedstime '2015-01-25 23:40' \
		--hardware 'TP-LINK CPE510 v3' --usecase 'Standard,kalua' \
		--release stable 'root@intercity-vpn.de:/var/www/networks/ejbw' || FAILED="$FAILED s5"
	git stash; test -e 'LICENSE' && cd ..
}

b5() {		# wifimac: 98dac4ea93ae
	echo; echo '=== next_image: b5 ==='; echo

	cd 'openwrt' && git checkout 'master' && test -e '.config' && rm -fR bin/ && make clean || true && \
	../build.sh \
		--buildid 'firmware@bittorf-wireless.com' \
		--openwrt r49276 --feedstime '2016-04-30 16:54' \
		--hardware 'TP-LINK CPE510 v3' --usecase 'Standard,kalua' \
		--release beta 'root@intercity-vpn.de:/var/www/networks/ejbw' || FAILED="$FAILED b5"
	git stash; test -e 'LICENSE' && cd ..
}

t5() {		# wifimac: 98dac4ea93ae
	echo; echo '=== next_image: t5 ==='; echo

	cd 'source' && git checkout 'master' && test -e '.config' && rm -fR bin/ && make clean || true && \
	../build.sh \
		--buildid 'firmware@bittorf-wireless.com' \
		--openwrt r4283 \
		--hardware 'TP-LINK CPE510 v3' --usecase 'Standard,kalua' \
		--release testing 'root@intercity-vpn.de:/var/www/networks/ejbw' || FAILED="$FAILED t5"
	git stash; test -e 'LICENSE' && cd ..
}

n5() {		# wifimac: 98dac4ea93ae
	echo; echo '=== next_image: n5 ==='; echo

	cd 'source' && git checkout 'master' && test -e '.config' && rm -fR bin/ && make clean || true && \
	../build.sh \
		--buildid 'firmware@bittorf-wireless.com' \
		--openwrt r$1 \
		--hardware 'TP-LINK CPE510 v3' --usecase 'Standard,kalua' \
		--release nightly 'root@intercity-vpn.de:/var/www/networks/ejbw' || FAILED="$FAILED n5"
	git stash; test -e 'LICENSE' && cd ..
}

s6() {		# wifimac: 98dac4ea93d8
	echo; echo '=== next_image: s6 ==='; echo

	cd 'openwrt' && git checkout 'master' && test -e '.config' && rm -fR bin/ && make clean || true && \
	../build.sh \
		--buildid 'firmware@bittorf-wireless.com' \
		--openwrt r44150 --feedstime '2015-01-25 23:40' \
		--hardware 'TP-LINK CPE510 v3' --usecase 'Standard-4mb,kalua' \
		--release stable 'root@intercity-vpn.de:/var/www/networks/ejbw' || FAILED="$FAILED s6"
	git stash; test -e 'LICENSE' && cd ..
}

b6() {		# wifimac: 98dac4ea93d8
	echo; echo '=== next_image: b6 ==='; echo

	cd 'openwrt' && git checkout 'master' && test -e '.config' && rm -fR bin/ && make clean || true && \
	../build.sh \
		--buildid 'firmware@bittorf-wireless.com' \
		--openwrt r49276 --feedstime '2016-04-30 16:54' \
		--hardware 'TP-LINK CPE510 v3' --usecase 'Standard-4mb,kalua' \
		--release beta 'root@intercity-vpn.de:/var/www/networks/ejbw' || FAILED="$FAILED b6"
	git stash; test -e 'LICENSE' && cd ..
}

t6() {		# wifimac: 98dac4ea93d8
	echo; echo '=== next_image: t6 ==='; echo

	cd 'source' && git checkout 'master' && test -e '.config' && rm -fR bin/ && make clean || true && \
	../build.sh \
		--buildid 'firmware@bittorf-wireless.com' \
		--openwrt r4283 \
		--hardware 'TP-LINK CPE510 v3' --usecase 'Standard-4mb,kalua' \
		--release testing 'root@intercity-vpn.de:/var/www/networks/ejbw' || FAILED="$FAILED t6"
	git stash; test -e 'LICENSE' && cd ..
}

n6() {		# wifimac: 98dac4ea93d8
	echo; echo '=== next_image: n6 ==='; echo

	cd 'source' && git checkout 'master' && test -e '.config' && rm -fR bin/ && make clean || true && \
	../build.sh \
		--buildid 'firmware@bittorf-wireless.com' \
		--openwrt r$1 \
		--hardware 'TP-LINK CPE510 v3' --usecase 'Standard-4mb,kalua' \
		--release nightly 'root@intercity-vpn.de:/var/www/networks/ejbw' || FAILED="$FAILED n6"
	git stash; test -e 'LICENSE' && cd ..
}

s7() {		# wifimac: a0f3c174a25f
	echo; echo '=== next_image: s7 ==='; echo

	cd 'openwrt' && git checkout 'master' && test -e '.config' && rm -fR bin/ && make clean || true && \
	../build.sh \
		--buildid 'firmware@bittorf-wireless.com' \
		--openwrt r44150 --feedstime '2015-01-25 23:40' \
		--hardware 'TP-LINK TL-WDR4300' --usecase 'Standard,kalua' \
		--release stable 'root@intercity-vpn.de:/var/www/networks/ejbw' || FAILED="$FAILED s7"
	git stash; test -e 'LICENSE' && cd ..
}

b7() {		# wifimac: a0f3c174a25f
	echo; echo '=== next_image: b7 ==='; echo

	cd 'openwrt' && git checkout 'master' && test -e '.config' && rm -fR bin/ && make clean || true && \
	../build.sh \
		--buildid 'firmware@bittorf-wireless.com' \
		--openwrt r49276 --feedstime '2016-04-30 16:54' \
		--hardware 'TP-LINK TL-WDR4300' --usecase 'Standard,kalua' \
		--release beta 'root@intercity-vpn.de:/var/www/networks/ejbw' || FAILED="$FAILED b7"
	git stash; test -e 'LICENSE' && cd ..
}

t7() {		# wifimac: a0f3c174a25f
	echo; echo '=== next_image: t7 ==='; echo

	cd 'source' && git checkout 'master' && test -e '.config' && rm -fR bin/ && make clean || true && \
	../build.sh \
		--buildid 'firmware@bittorf-wireless.com' \
		--openwrt r4283 \
		--hardware 'TP-LINK TL-WDR4300' --usecase 'Standard,kalua' \
		--release testing 'root@intercity-vpn.de:/var/www/networks/ejbw' || FAILED="$FAILED t7"
	git stash; test -e 'LICENSE' && cd ..
}

n7() {		# wifimac: a0f3c174a25f
	echo; echo '=== next_image: n7 ==='; echo

	cd 'source' && git checkout 'master' && test -e '.config' && rm -fR bin/ && make clean || true && \
	../build.sh \
		--buildid 'firmware@bittorf-wireless.com' \
		--openwrt r$1 \
		--hardware 'TP-LINK TL-WDR4300' --usecase 'Standard,kalua' \
		--release nightly 'root@intercity-vpn.de:/var/www/networks/ejbw' || FAILED="$FAILED n7"
	git stash; test -e 'LICENSE' && cd ..
}

# DEBUG: usecase invalid: 'Standard,kalua,VDS,BTCminer' - see: d85d4cf6281a
stable() {
	s1;s2;s3;s4;s5;s6;s7;
}

beta() {
	b1;b2;b3;b4;b5;b6;b7;
}

testing() {
	t1;t2;t3;t4;t5;t6;t7;
}

nightly() {
	n1;n2;n3;n4;n5;n6;n7;
}

all() { stable; beta; testing; }

update() { wget -O build_all.sh http://intercity-vpn.de/networks/ejbw/firmware/build_all.sh; }

# overall stable + beta + testing: 7 + 7 + 7 = 21 images
# already build: 0 images
# still needed: 21 images
#
# START: Fri Mar  3 20:46:46 CET 2023
# READY: Fri Mar  3 20:46:53 CET 2023
