Add zip, fix global variables in the serial generator.

pull/155/head
sickcodes 4 years ago
parent 5aa689e8ad
commit 372905218f

@ -91,7 +91,7 @@ RUN if [[ "${RANKMIRRORS}" ]]; then \
# RUN tee -a /etc/pacman.conf <<< '[community-testing]' \ # RUN tee -a /etc/pacman.conf <<< '[community-testing]' \
# && tee -a /etc/pacman.conf <<< 'Include = /etc/pacman.d/mirrorlist' # && tee -a /etc/pacman.conf <<< 'Include = /etc/pacman.d/mirrorlist'
RUN pacman -Syu git vim nano alsa-utils openssh --noconfirm \ RUN pacman -Syu git zip vim nano alsa-utils openssh --noconfirm \
&& ln -s /bin/vim /bin/vi \ && ln -s /bin/vim /bin/vi \
&& useradd arch -p arch \ && useradd arch -p arch \
&& tee -a /etc/sudoers <<< 'arch ALL=(ALL) NOPASSWD: ALL' \ && tee -a /etc/sudoers <<< 'arch ALL=(ALL) NOPASSWD: ALL' \

@ -93,17 +93,17 @@ done
build_mac_serial () { build_mac_serial () {
MACINFOPKG_VERSION="${MACINFOPKG_VERSION:=2.1.2}" export MACINFOPKG_VERSION="${MACINFOPKG_VERSION:=2.1.2}"
wget -O "${TARBALL:=./MacInfoPkg.tar.gz}" \ wget -O "${TARBALL:=./MacInfoPkg.tar.gz}" \
"https://github.com/acidanthera/MacInfoPkg/archive/${MACINFOPKG_VERSION:=2.1.2}.tar.gz" "https://github.com/acidanthera/MacInfoPkg/archive/${MACINFOPKG_VERSION}.tar.gz"
tar -xzvf "${TARBALL}" tar -xzvf "${TARBALL}"
cd "./MacInfoPkg-${MACINFOPKG_VERSION}/macserial" \ cd "./MacInfoPkg-${MACINFOPKG_VERSION}/macserial" \
&& ./build.tool 2>/dev/null \ && ./build.tool \
&& cd - && cd -
mv "./MacInfoPkg-${MACINFOPKG_VERSION}/macserial/bin/macserial" . mv "./MacInfoPkg-${MACINFOPKG_VERSION}/macserial/bin/macserial" .
rm -f "${TARBALL}" rm -f "${TARBALL}"
rm -rf "./MacInfoPkg-${MACINFOPKG_VERSION}/" rm -rf "./MacInfoPkg-${MACINFOPKG_VERSION}/"
chmod +x macserial chmod +x ./macserial
stat ./macserial stat ./macserial
} }
@ -156,10 +156,13 @@ EOF
main () { main () {
# setting default variables if there are no options # setting default variables if there are no options
export DEVICE_MODEL="${DEVICE_MODEL:=iMacPro1,1}"
export SERIAL_SET_COUNT="${SERIAL_SET_COUNT:=1}"
export OUTPUT_DIRECTORY="${OUTPUT_DIRECTORY:=.}"
cat <<EOF cat <<EOF
DEVICE_MODEL: ${DEVICE_MODEL:=iMacPro1,1} DEVICE_MODEL: ${DEVICE_MODEL}
SERIAL_SET_COUNT: ${SERIAL_SET_COUNT:=1} SERIAL_SET_COUNT: ${SERIAL_SET_COUNT}
OUTPUT_DIRECTORY: ${OUTPUT_DIRECTORY:=.} OUTPUT_DIRECTORY: ${OUTPUT_DIRECTORY}
EOF EOF
[[ -d "${OUTPUT_DIRECTORY}" ]] || mkdir -p "${OUTPUT_DIRECTORY}" [[ -d "${OUTPUT_DIRECTORY}" ]] || mkdir -p "${OUTPUT_DIRECTORY}"
[[ -e ./macserial ]] || build_mac_serial [[ -e ./macserial ]] || build_mac_serial

Loading…
Cancel
Save