mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-14 19:14:27 +05:00
restructure install/update for dwc2
This commit is contained in:
@@ -1,8 +1,6 @@
|
|||||||
#TODO
|
#TODO
|
||||||
# - update the correct branch
|
|
||||||
# - version checks before updating
|
# - version checks before updating
|
||||||
|
|
||||||
#WIP
|
|
||||||
update_check(){
|
update_check(){
|
||||||
read_local_commit
|
read_local_commit
|
||||||
read_remote_commit
|
read_remote_commit
|
||||||
@@ -49,23 +47,7 @@ update_dwc2fk(){
|
|||||||
|
|
||||||
update_dwc2(){
|
update_dwc2(){
|
||||||
bb4u "dwc2"
|
bb4u "dwc2"
|
||||||
#check dependencies
|
install_dwc2
|
||||||
dep=(wget gzip tar curl)
|
|
||||||
dependency_check
|
|
||||||
#execute operation
|
|
||||||
GET_DWC2_URL=`curl -s https://api.github.com/repositories/28820678/releases/latest | grep browser_download_url | cut -d'"' -f4`
|
|
||||||
if [ ! -d $DWC2_DIR/web ]; then
|
|
||||||
mkdir -p $DWC2_DIR/web
|
|
||||||
fi
|
|
||||||
cd $DWC2_DIR/web
|
|
||||||
status_msg "Downloading DWC2 Web UI ..."
|
|
||||||
wget -q $GET_DWC2_URL && ok_msg "Download complete!"
|
|
||||||
status_msg "Unzipping archive ..."
|
|
||||||
unzip -q -o *.zip && for f_ in $(find . | grep '.gz');do gunzip -f ${f_};done && ok_msg "Done!"
|
|
||||||
status_msg "Writing version to file ..."
|
|
||||||
echo $GET_DWC2_URL | cut -d/ -f8 > $DWC2_DIR/web/version && ok_msg "Done!"
|
|
||||||
status_msg "Do a little cleanup ..."
|
|
||||||
rm -rf DuetWebControl-SD.zip && ok_msg "Done!"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
update_mainsail(){
|
update_mainsail(){
|
||||||
|
|||||||
Reference in New Issue
Block a user