Minor tweaks to improve outputs from Bash scripts (#197)

* replaced ugly tar output with simple messages

* replaced ugly tar extraction output

* Update mynode-local-upgrade

* Suppress the null byte warning
This commit is contained in:
Abhishek Shandilya 2020-02-16 23:27:27 -05:00 committed by GitHub
parent 32ac3ed159
commit 7deec49409
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 5 deletions

View File

@ -1,6 +1,7 @@
#!/bin/bash
for i in 'rock64' 'rockpro64' 'raspi3' 'raspi4' 'debian'; do
echo Creating root file system for $i
mkdir -p out/rootfs_$i/
rsync -r -u rootfs/standard/* out/rootfs_$i/
rsync -r -u rootfs/$i/* out/rootfs_$i/
@ -8,5 +9,6 @@ for i in 'rock64' 'rockpro64' 'raspi3' 'raspi4' 'debian'; do
cp -f setup/setup_device.sh out/setup_device.sh
rm -f out/mynode_rootfs_$i.tar.gz
tar -zcvf out/mynode_rootfs_$i.tar.gz ./out/rootfs_$i/*
tar -zcf out/mynode_rootfs_$i.tar.gz out/rootfs_$i/*
done
echo Done!

View File

@ -25,7 +25,9 @@ wget http://${ip_address}:8000/mynode_rootfs_${DEVICE_TYPE}.tar.gz -O /tmp/mynod
# Extract on top of mynode fs
rm -rf /tmp/rootfs/
mkdir -p /tmp/rootfs/
tar -xvf /tmp/mynode_rootfs_${DEVICE_TYPE}.tar.gz -C /tmp/rootfs/
echo -n "Extracting rootfs TAR for ${DEVICE_TYPE}... "
tar -xf /tmp/mynode_rootfs_${DEVICE_TYPE}.tar.gz -C /tmp/rootfs/
echo Done!
# Install files
if [ $IS_X86 = 1 ]; then

View File

@ -9,7 +9,7 @@ IS_RASPI3=0
IS_RASPI4=0
IS_X86=0
DEVICE_TYPE="unknown"
MODEL=$(cat /proc/device-tree/model) || MODEL="unknown"
MODEL=$(tr -d '\0' < /proc/device-tree/model) || MODEL="unknown"
uname -a | grep amd64 && IS_X86=1 || true
if [[ $MODEL == *"Rock64"* ]]; then
IS_ARMBIAN=1