This repository has been archived by the owner on Dec 17, 2023. It is now read-only.
forked from GaryTomato/buffaloplex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1-createsrc
58 lines (50 loc) · 2.08 KB
/
1-createsrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/sh
#Get the vanilla firmware and break it out
. ./0-vars
#Possible passwords
#1NIf_2yUOlRDpYZUVNqboRpMBoZwT4PzoUvOPUp6l
#aAhvlM1Yp7_2VSm6BhgkmTOrCN1JyE0C5Q6cB3oBB
#YvSInIQopeipx66t_DCdfEvfP47qeVPhNhAuSYmA4
#IeY8omJwGlGkIbJm2FH_MV4fLsXE8ieu0gNYwE6Ty
OLDSRC=./old-src
echo $0 running...
echo " Making sure that files that are not synced with GitHub are present"
if [ ! -f $FIRMWARES/ls_series-$VERSION.zip ]; then
echo " -- Getting Linkstation firmware"
sh $FIRMWARES/scripts/get-firmware
if [ "x$VERSION" == "x169" ]; then
wget http://buffalotech.com/support-and-downloads/download/ls_series-169.zip -O $FIRMWARES/ls_series-169.zip
else
echo "***"
echo "*** I don't have the links to Linkstation firmware $VERSIONDOT. Please download it manually and put it into $FIRMWARES before you continue. ***"
echo "***"
echo "Sleeping 10 seconds so you can cancel the script."
sleep 10
exit 1
fi
fi
if [ ! -f $FIRMWARES/$PLEXBIN ]; then
echo " -- Getting Plex Media Server package"
if [ "x$PLEXBIN" == "xPlexMediaServer-0.9.11.7.803-87d0708-arm.spk" ]; then
wget https://downloads.plex.tv/plex-media-server/0.9.11.7.803-87d0708/PlexMediaServer-0.9.11.7.803-87d0708-arm.spk -O $FIRMWARES/PlexMediaServer-0.9.11.7.803-87d0708-arm.spk
else
echo "***"
echo "*** I don't have the links to $PLEXBIN. Please download it manually and put it into $FIRMWARES before you continue. ***"
echo "***"
echo "Sleeping 10 seconds so you can cancel the script."
sleep 10
exit 1
fi
fi
[ -d $RESOURCES/ls_series-$VERSION ] && rm -rf $RESOURCES/ls_series-$VERSION
echo " Unzipping ls_series-$VERSION.zip"
unzip -q -o $FIRMWARES/ls_series-$VERSION.zip -d $RESOURCES
echo " Unzipping hddrootfs.img"
unzip -q -o -d $RESOURCES -P "`cat $RESOURCES/password$VERSION`" $RESOURCES/ls_series-$VERSION/LinkStation_FW$VERSIONDOT/hddrootfs.img
rm $RESOURCES/ls_series-$VERSION/LinkStation_FW$VERSIONDOT/hddrootfs.img
rm -rf $OLDSRC
test -d $SRC && mv $SRC $OLDSRC
mkdir $SRC
echo " Untarring hddrootfs.buffalo.updated"
tar -xzf $RESOURCES/hddrootfs.buffalo.updated -C $SRC
rm $RESOURCES/hddrootfs.buffalo.updated