mirror of
https://github.com/AuxXxilium/arv-v-dsm.git
synced 2024-11-23 23:10:58 +07:00
fix: Variables
fix: Variables
This commit is contained in:
commit
0c9559f695
@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -Eeuo pipefail
|
||||
|
||||
: ${URL:=''} # URL of the PAT file to be downloaded.
|
||||
: ${DEV:='Y'} # Controls whether device nodes are created.
|
||||
|
||||
if [ -f "$STORAGE"/dsm.ver ]; then
|
||||
@ -10,7 +11,6 @@ else
|
||||
BASE="DSM_VirtualDSM_42962"
|
||||
fi
|
||||
|
||||
: ${URL:=''}
|
||||
[ -n "$URL" ] && BASE=$(basename "$URL" .pat)
|
||||
|
||||
if [[ -f "$STORAGE/$BASE.boot.img" ]] && [[ -f "$STORAGE/$BASE.system.img" ]]; then
|
||||
@ -112,12 +112,12 @@ if [ -f "${RDC}" ]; then
|
||||
if [[ "${DEV}" == [Nn]* ]]; then
|
||||
# Exclude dev/ from cpio extract
|
||||
{ (cd "$TMP" && cpio -it < "$TMP/rd" | grep -Ev 'dev/' | while read -r entry; do cpio -idm "$entry" < "$TMP/rd" 2>/dev/null; done); rc=$?; } || :
|
||||
(( rc != 0 )) && error "Failed to extract $RDC, reason $rc" && exit 92
|
||||
else
|
||||
{ (cd "$TMP" && cpio -idm <"$TMP/rd" 2>/dev/null); rc=$?; } || :
|
||||
(( rc != 0 )) && error "Failed to cpio $RDC, reason $rc" && exit 92
|
||||
fi
|
||||
|
||||
(( rc != 0 )) && error "Failed to extract $RDC, reason $rc" && exit 92
|
||||
|
||||
mkdir -p /run/extract
|
||||
for file in $TMP/usr/lib/libcurl.so.4 \
|
||||
$TMP/usr/lib/libmbedcrypto.so.5 \
|
||||
|
Loading…
Reference in New Issue
Block a user