Skip to content

Commit

Permalink
chore(all): update to v0.11.4
Browse files Browse the repository at this point in the history
  • Loading branch information
tossp committed Oct 11, 2021
1 parent b33877d commit 33086d3
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions syno.sh → synoboot.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
#!/usr/bin/env bash

T='/dev/synoboot'
S='images/redpill-DS[39]*.img'

cd $(dirname $(readlink -f "$0"))

S='images/redpill-*'
T='/dev/synoboot'
IMG_FILE=`ls -lt ${S} 2>/dev/null | awk 'NR==1{print $9}'`

if [ ! -b "${T}" ];then
echo -e "The target block device address does not exist:\t${T}"
exit 1
fi


if [ -f "${IMG_FILE}" ];then
echo -e "Boot image:\t\t${PWD}/${IMG_FILE}"
echo -e "Target block device:\t${T}"
dd if="${IMG_FILE}" of="${T}" bs=4M conv=nocreat oflag=sync status=progress
else
if [ ! -f "${IMG_FILE}" ];then
echo -e "Is not a valid file:\t${IMG_FILE}"
ls -lt ${S}
exit 1
fi

echo -e "Boot image:\t\t${PWD}/${IMG_FILE}"
echo -e "Target block device:\t${T}"
dd if="${IMG_FILE}" of="${T}" bs=4M conv=nocreat oflag=sync status=progress

0 comments on commit 33086d3

Please sign in to comment.