diff --git a/buildconfigs/buffalo-wzr-hp-ag300h/.config b/buildconfigs/buffalo-wzr-hp-ag300h/config similarity index 100% rename from buildconfigs/buffalo-wzr-hp-ag300h/.config rename to buildconfigs/buffalo-wzr-hp-ag300h/config diff --git a/buildconfigs/buffalo-wzr-hp-ag300h/configure.sh b/buildconfigs/buffalo-wzr-hp-ag300h/configure.sh deleted file mode 100755 index 691ac76..0000000 --- a/buildconfigs/buffalo-wzr-hp-ag300h/configure.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -cd $TEMP_DIR -echo "./configure is being run in `pwd`" -git clone https://github.com/opentechinstitute/commotion-router.git -cd commotion-router -SRC_DIR="`pwd`/openwrt" -echo "As of the end of ./configure, we think the location of the openwrt makefile is: $SRC_DIR" -./setup.sh -cp /mnt/custom/buffalo-wzr-hp-ag300h/files/etc/config/network $SRC_DIR/files/etc/config/ -cp /mnt/custom/buffalo-wzr-hp-ag300h/.config $SRC_DIR diff --git a/buildconfigs/buffalo-wzr-hp-g300nh/.config b/buildconfigs/buffalo-wzr-hp-g300nh/config similarity index 100% rename from buildconfigs/buffalo-wzr-hp-g300nh/.config rename to buildconfigs/buffalo-wzr-hp-g300nh/config diff --git a/buildconfigs/buffalo-wzr-hp-g300nh/configure.sh b/buildconfigs/buffalo-wzr-hp-g300nh/configure.sh deleted file mode 100755 index a8df970..0000000 --- a/buildconfigs/buffalo-wzr-hp-g300nh/configure.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -cd $TEMP_DIR -echo "./configure is being run in `pwd`" -git clone https://github.com/opentechinstitute/commotion-router.git -cd commotion-router -SRC_DIR="`pwd`/openwrt" -echo "As of the end of ./configure, we think the location of the openwrt makefile is: $SRC_DIR" -./setup.sh -cp /mnt/custom/buffalo-wzr-hp-g300nh/files/etc/config/network $SRC_DIR/files/etc/config/ -cp /mnt/custom/buffalo-wzr-hp-g300nh/.config $SRC_DIR diff --git a/buildconfigs/mikrotik-RB411AH-install-image/.config b/buildconfigs/mikrotik-RB411AH-install-image/config similarity index 100% rename from buildconfigs/mikrotik-RB411AH-install-image/.config rename to buildconfigs/mikrotik-RB411AH-install-image/config diff --git a/buildconfigs/mikrotik-RB411AH-install-image/configure.sh b/buildconfigs/mikrotik-RB411AH-install-image/configure.sh deleted file mode 100755 index 6bd4e5f..0000000 --- a/buildconfigs/mikrotik-RB411AH-install-image/configure.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -cd $TEMP_DIR -echo "./configure is being run in `pwd`" -git clone https://github.com/opentechinstitute/commotion-router.git -cd commotion-router -SRC_DIR="`pwd`/openwrt" -echo "As of the end of ./configure, we think the location of the openwrt makefile is: $SRC_DIR" -./setup.sh -cp /mnt/custom/mikrotik-RB411AH-install-image/.config $SRC_DIR diff --git a/buildconfigs/mikrotik-RB411AH-netboot-ramdisk/.config b/buildconfigs/mikrotik-RB411AH-netboot-ramdisk/config similarity index 100% rename from buildconfigs/mikrotik-RB411AH-netboot-ramdisk/.config rename to buildconfigs/mikrotik-RB411AH-netboot-ramdisk/config diff --git a/buildconfigs/mikrotik-RB411AH-netboot-ramdisk/configure.sh b/buildconfigs/mikrotik-RB411AH-netboot-ramdisk/configure.sh deleted file mode 100755 index 8369064..0000000 --- a/buildconfigs/mikrotik-RB411AH-netboot-ramdisk/configure.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -cd $TEMP_DIR -echo "./configure is being run in `pwd`" -git clone https://github.com/opentechinstitute/commotion-router.git -cd commotion-router -SRC_DIR="`pwd`/openwrt" -echo "As of the end of ./configure, we think the location of the openwrt makefile is: $SRC_DIR" -./setup.sh -cp /mnt/custom//mnt/custom/mikrotik-RB411AH-netboot-ramdisk/.config $SRC_DIR diff --git a/buildconfigs/tp-link-wdr4300/.config b/buildconfigs/tp-link-wdr4300/config similarity index 100% rename from buildconfigs/tp-link-wdr4300/.config rename to buildconfigs/tp-link-wdr4300/config diff --git a/buildconfigs/tp-link-wdr4300/configure.sh b/buildconfigs/tp-link-wdr4300/configure.sh deleted file mode 100755 index 01e894f..0000000 --- a/buildconfigs/tp-link-wdr4300/configure.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -cd $TEMP_DIR -echo "./configure is being run in `pwd`" -git clone https://github.com/opentechinstitute/commotion-router.git -cd commotion-router -SRC_DIR="`pwd`/openwrt" -echo "As of the end of ./configure, we think the location of the openwrt makefile is: $SRC_DIR" -./setup.sh -cp /mnt/custom/tp-link-wdr4300/files/etc/config/network $SRC_DIR/files/etc/config/ -cp /mnt/custom/tp-link-wdr4300/.config $SRC_DIR diff --git a/setup.sh b/setup.sh index 80d0be2..e15f10d 100755 --- a/setup.sh +++ b/setup.sh @@ -1,5 +1,17 @@ #!/bin/sh +if [ -n "$1" ]; then + if [ -d buildconfigs/$1 ]; then + BUILD="$1" + echo "Using buildconfig $1" + else + echo "Invalid buildconfig parameter" + echo "Usage: ./setup.sh [router build]" + echo "Check the buildconfigs directory for a list of available builds" + exit 1 + fi +fi + svn co svn://svn.openwrt.org/openwrt/branches/attitude_adjustment openwrt cd openwrt @@ -31,6 +43,12 @@ mkdir -p package/netifd/patches cp -v ../patches/010-iface_name_len.patch package/netifd/patches/ cp -v ../config .config +if [ -n "$BUILD" ]; then + echo "Copying over build-specific files for $BUILD" + [ -f ../buildconfigs/$BUILD/config ] && cp -v ../buildconfigs/$BUILD/config .config + [ -d ../buildconfigs/$BUILD/files ] && cp -rf -v ../buildconfigs/$BUILD/files/* files/ +fi + echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" echo " Commotion OpenWrt is prepared. To build the firmware, type:" echo " cd openwrt"