Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Introducing Updates! - ScriBt checks updates for a newer version based on the Version number mentioned in the VERSION file - If Version in the Remote is greater than the Local Version, then User is prompted whether to update ScriBt - Work is done by the script upScriBt.sh ROM.sh first checks for changes in upScriBt.sh and updates it if present. upScriBt.sh then checks updates based on the above procedure. * Solve a Pre-Build bug I still don't know why, but the first 'if' on function device_info (Now Removed) gets the Value of ROMV to be non-zero. Puzzling! So I replaced that check with the ROM Selection Number SBRN instead. I'd look onto it soon. * Correct a ROM Selection Number typo in vendor_strat_all * sudo is known to be temporary. A sudo session only lasts for 5-15 minutes depending on the Linux Distro. So removed that single prompt at the start Temporarily. * NEW SYMBOL [#] in PINK color means the 'sudo' prompt. Replaced the '[sudo] password for user:' prompt with this one to make it look better
- Loading branch information
Showing
4 changed files
with
96 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.35 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |