Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@foertel
Last active September 26, 2016 10:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save foertel/620154515b3c31ab782078d097f1b46e to your computer and use it in GitHub Desktop.
Save foertel/620154515b3c31ab782078d097f1b46e to your computer and use it in GitHub Desktop.
Little firmware build script
#!/bin/bash
cd gluon/
SITES=$(dialog --title "Select site.conf" --checklist "Chose" 15 60 4 \
com1 "Community 1" OFF \
com2 "Comunity 2" OFF 3>&2 2>&1 1>&3) # show dialog and store output
clear
GLUON_BRANCH=$(dialog --title "Branch" --menu "Chose one" 15 60 3 \
stable "Stable" \
beta "Beta" \
experimental "Experimental" 3>&2 2>&1 1>&3) # show dialog and store output
clear
TARGETS=$(dialog --title "Target" --checklist "Chose" 15 60 3 \
ar71xx-generic "AR71xx Generic" OFF \
x86-generic "x86 Generic" OFF 3>&2 2>&1 1>&3) # show dialog and store output
clear
for SITE in $SITES; do
echo "building $GLUON_BRANCH : $SITE"
rm -rf ~/firmware/${SITE}-firmware/$GLOUN_BRANCH/*
for TARGET in $TARGETS; do
echo "..building: $TARGET"
echo "make -j5 GLUON_SITEDIR=~/firmware/${SITE}-site GLUON_IMAGEDIR=~/firmware/${SITE}-firmware/$GLUON_BRANCH GLUON_TARGET=$TARGET"
make -j5 GLUON_SITEDIR=~/firmware/${SITE}-site GLUON_IMAGEDIR=~/firmware/${SITE}-firmware/$GLUON_BRANCH GLUON_TARGET=$TARGET
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment