blob: 6739993841c1994033ee91ac1076d4d0b840b8d0 [file] [log] [blame]
Denys Vlasenkobddbeb82017-01-02 13:48:06 +01001#!/bin/sh
2# Extract uuencoded and bzipped busybox binaries
3# from system-image-*.log files
4
5for logfile in system-image-*.log; do
6 grep -q '^begin 744 busybox.bz2' "$logfile" \
7 || { echo "No busybox.bz2 in $logfile"; continue; }
8
9 arch=${logfile%.log}
10 arch=${arch#system-image-}
11
12 test -e "busybox-$arch" \
13 && { echo "busybox-$arch exists, not overwriting"; continue; }
14
15 uudecode -o - "$logfile" | bunzip2 >"busybox-$arch" \
16 && chmod 755 "busybox-$arch"
17done