Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Bring system current
sudo apt-get update && sudo apt-get -y upgrade
# Install required pi-gen dependencies
sudo apt-get -y install coreutils quilt parted qemu-user-static debootstrap zerofree zip \
dosfstools bsdtar libcap2-bin grep rsync xz-utils file git curl bc
# Get pi-gen git repo
@thnk2wn
thnk2wn / pi-gen-iot-edge-build.sh
Created May 15, 2020 12:19
Builds a custom Raspbian Lite image for Azure IoT Edge
#!/bin/bash
# echo "$pass" | sudo -S ./build.sh
# echo "$pass" | sudo -S ./build.sh --clean
# Builds a Raspbian lite image with some customizations include default locale, username, pwd, host name, boot setup customize etc.
# Must be run on Debian Buster or Ubuntu Xenial and requires some "horsepower".
SECONDS=0
clean=false
function Invoke-Scripts($server, $user, $password) {
"Running scripts for $user on $server"
pushd $user
$files = @(gci | where {!$_.PsIsContainer})
$count = 0
foreach ($file in $files) {
write-progress -activity "Running scripts for $user" `
-currentoperation $file.name -status Executing `
-PercentComplete (100*$count++/$files.count)