#A non-fancy basic OpenWRT Build script by Glitch #Feel free to use it as a base for your own builds mkdir -p $(date +"%Y%m%d") #make the folder with the date rm -rf openwrt #complete cleanup git clone https://github.com/openwrt/openwrt.git #checkout repository cd openwrt #enter repository git config user.name "Glitch" #set your username (not important for buildling so this can be whatever) git config user.email "wrt@glitchery.jp" #set your email (not important for building so this can be whatever) ./scripts/feeds update -a && ./scripts/feeds install -a git am ../patch/*.patch #apply patches from patch folder that exists one directory up. cp -R ../files/* package/base-files/files/ #copy any files that you want to exist by default on your build cp ../config .config make defconfig make -j$(nproc) defconfig download clean world #move files to prepare for uploading mv bin/* ../2*/ #move the final build images and packages up to the date folder cd .. #exit openwrt folder #rm -rf 2*/packages #delete packages, because it grabs from default openwrt sources anyways rm -rf openwrt #cleanup after everything is done, saves space, prepare for next clean next time (yes, i do it twice) #INSERT CUSTOM UPLOAD CODE HERE