Repository navigation
Expand file tree
/
Copy pathupScriBt.sh
More file actions
39 lines (38 loc) · 1.72 KB
/
Copy pathupScriBt.sh
File metadata and controls
39 lines (38 loc) · 1.72 KB
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
#!/bin/bash
#===========================< upScriBt >===============================#
#===========< Copyright 2016, Arvindraj Thangaraj - "a7r3" >===========#
#====================< Part of Projekt ScriBt >========================#
# USB_VER 1
RVER=`curl https://raw.githubusercontent.com/a7r3/ScriBt/master/VERSION -s`;
LVER="cat VERSION";
if [[ "${RVER}" > "${LVER}" ]]; then
echo -e "${SCS} Update Detected. Version ${RVER}\n";
echo -e "${QN} Do you want to Update";
read UDPR;
case "$UDPR" in
[Yy])
mkdir old;
echo -e "\n${EXE} Updating ScriBt to Version $RVER\n";
for file in ROM.sh ROM.rc PREF.rc README.md VERSION; do
mv ${file} old/${file};
echo -e "${file} `curl -# -s -o ${file} https://raw.githubusercontent.com/a7r3/ScriBt/master/${file}`-> Done.";
done
echo -e "${SCS} ScriBt updated Successfully\n";
echo -e "${INF} Old Version of ScriBt has been moved under ${CL_WYT}old${NONE} folder.\n";
echo -e "\n${EXE} Restarting ScriBt with the provided parameters";
if [[ "$1" == "automate" ]] || [[ "$3" == "automate" ]]; then
echo -e "\n${INF} PREF.rc has been brought back to default";
echo -e "\n${INF} Please make the changes you made in old PREF.rc which is located under the ${CL_WYT}old${NONE} folder";
read ENTER;
echo -e "${SCS} Done.";
fi
exec bash ROM.sh $@;
;;
[Nn])
echo -e "\n${INF} Staying on v${LVER}\n${INF} But it is recommended to update ScriBt\n";
;;
esac
else
echo -e "\n${SCS} ScriBt is up-to-date";
echo -e "\n${EXE} Continuing";
fi