Skip to content

Instantly share code, notes, and snippets.

@streof
Created June 22, 2020 12:12
Show Gist options
  • Save streof/79b6e92d652336e53bb69d48dca81a4b to your computer and use it in GitHub Desktop.
Save streof/79b6e92d652336e53bb69d48dca81a4b to your computer and use it in GitHub Desktop.
#!/bin/sh
# Purpose: Download `bwi(4)` and `bwn(4)` including dependencies
# Note: Instead of master/head you might need/want to use another branch
# Instead of `svn export` you might want to use `svn checkout`
# On FreeBSD, if you don't have `wget` installed, use `fetch(1)`
# --------------------------------------------------------------------
# Create a local sink
mkdir usr && cd usr
# Kernel source code
svn export https://svn.freebsd.org/base/head src
# Keywords
wget https://raw.githubusercontent.com/freebsd/freebsd-ports/master/Keywords/kld.ucl -P ports/Keywords
# Mk/Scripts
wget https://raw.githubusercontent.com/freebsd/freebsd-ports/master/Mk/Scripts/actual-package-depends.sh -P ports/Mk/Scripts
wget https://raw.githubusercontent.com/freebsd/freebsd-ports/master/Mk/Scripts/checksum.sh -P ports/Mk/Scripts
wget https://raw.githubusercontent.com/freebsd/freebsd-ports/master/Mk/Scripts/create-manifest.sh -P ports/Mk/Scripts
wget https://raw.githubusercontent.com/freebsd/freebsd-ports/master/Mk/Scripts/depends-list.sh -P ports/Mk/Scripts
wget https://raw.githubusercontent.com/freebsd/freebsd-ports/master/Mk/Scripts/do-depends.sh -P ports/Mk/Scripts
wget https://raw.githubusercontent.com/freebsd/freebsd-ports/master/Mk/Scripts/do-fetch.sh -P ports/Mk/Scripts
wget https://raw.githubusercontent.com/freebsd/freebsd-ports/master/Mk/Scripts/do-patch.sh -P ports/Mk/Scripts
wget https://raw.githubusercontent.com/freebsd/freebsd-ports/master/Mk/Scripts/functions.sh -P ports/Mk/Scripts
wget https://raw.githubusercontent.com/freebsd/freebsd-ports/master/Mk/Scripts/security-check.awk -P ports/Mk/Scripts
# Mk/Uses
wget https://raw.githubusercontent.com/freebsd/freebsd-ports/master/Mk/Uses/kmod.mk -P ports/Mk/Uses
wget https://raw.githubusercontent.com/freebsd/freebsd-ports/master/Mk/Uses/uidfix.mk -P ports/Mk/Uses
wget https://raw.githubusercontent.com/freebsd/freebsd-ports/master/Mk/Uses/gmake.mk -P ports/Mk/Uses
wget https://raw.githubusercontent.com/freebsd/freebsd-ports/master/Mk/Uses/cpe.mk -P ports/Mk/Uses
# Mk
wget https://raw.githubusercontent.com/freebsd/freebsd-ports/master/Mk/bsd.ccache.mk -P ports/Mk
wget https://raw.githubusercontent.com/freebsd/freebsd-ports/master/Mk/bsd.commands.mk -P ports/Mk
wget https://raw.githubusercontent.com/freebsd/freebsd-ports/master/Mk/bsd.default-versions.mk -P ports/Mk
wget https://raw.githubusercontent.com/freebsd/freebsd-ports/master/Mk/bsd.java.mk -P ports/Mk
wget https://raw.githubusercontent.com/freebsd/freebsd-ports/master/Mk/bsd.licenses.db.mk -P ports/Mk
wget https://raw.githubusercontent.com/freebsd/freebsd-ports/master/Mk/bsd.licenses.mk -P ports/Mk
wget https://raw.githubusercontent.com/freebsd/freebsd-ports/master/Mk/bsd.options.mk -P ports/Mk
wget https://raw.githubusercontent.com/freebsd/freebsd-ports/master/Mk/bsd.port.mk -P ports/Mk
wget https://raw.githubusercontent.com/freebsd/freebsd-ports/master/Mk/bsd.sanity.mk -P ports/Mk
wget https://raw.githubusercontent.com/freebsd/freebsd-ports/master/Mk/bsd.sites.mk -P ports/Mk
wget https://raw.githubusercontent.com/freebsd/freebsd-ports/master/Mk/bsd.ssp.mk -P ports/Mk
# Templates
wget https://raw.githubusercontent.com/freebsd/freebsd-ports/master/Templates/BSD.local.dist -P ports/Templates
# devel
svn export https://svn.freebsd.org/ports/head/devel/gmake/ ports/devel/gmake
# distfiles
wget https://bues.ch/b43/fwcutter/b43-fwcutter-019.tar.bz2 -P ports/distfiles
wget http://downloads.openwrt.org/sources/broadcom-wl-4.150.10.5.tar.bz2 -P ports/distfiles
wget http://mirror2.openwrt.org/sources/broadcom-wl-4.178.10.4.tar.bz2 -P ports/distfiles
wget http://downloads.openwrt.org/sources/broadcom-wl-5.100.138.tar.bz2 -P ports/distfiles
wget http://downloads.openwrt.org/sources/wl_apsta-3.130.20.0.o -P ports/distfiles
# net
svn export https://svn.freebsd.org/ports/head/net/bwi-firmware-kmod ports/net/bwi-firmware-kmod
svn export https://svn.freebsd.org/ports/head/net/bwn-firmware-kmod ports/net/bwn-firmware-kmod
# sysutils
svn export https://svn.freebsd.org/ports/head/sysutils/b43-fwcutter ports/sysutils/b43-fwcutter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment