Skip to content

Instantly share code, notes, and snippets.

@song940
Created January 28, 2021 13:04
Show Gist options
  • Save song940/5c81ed270437797a3316e9d31b18426a to your computer and use it in GitHub Desktop.
Save song940/5c81ed270437797a3316e9d31b18426a to your computer and use it in GitHub Desktop.
#!/bin/sh
# https://openwrt.org/docs/guide-developer/build-system/buildroot.exigence.macosx
brew install coreutils findutils gawk grep gnu-getopt gnu-tar wget diffutils git-extras quilt make ncurses pkg-config
PATH="/usr/local/opt/make/libexec/gnubin:$PATH"
PATH="/usr/local/opt/gnu-getopt/bin:$PATH"
PATH="/usr/local/opt/gettext/bin:$PATH"
PATH="/usr/local/opt/coreutils/bin:$PATH"
PATH="/usr/local/opt/findutils/libexec/gnubin:$PATH"
hdiutil create -size 24g -fs 'Case-sensitive HFS+' -type SPARSEBUNDLE -nospotlight -volname OpenWRT-build OpenWRT-build
hdiutil attach OpenWRT-build.sparsebundle
cd /Volumes/OpenWRT-build
if [[ -d openwrt ]]; then
cd openwrt
git pull
else
# git clone git://git.openwrt.org/openwrt.git
git clone https://github.com/openwrt/openwrt.git
cd openwrt
fi
scripts/feeds update -a
scripts/feeds install -a
make defconfig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment