Skip to content

Commit

Permalink
Fixing errors
Browse files Browse the repository at this point in the history
This upgrade fixes some typo bugs. Later I'll add a self-extracting installer.
  • Loading branch information
Nepose committed Jun 10, 2019
1 parent aca478a commit 691338c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 32 deletions.
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The toolchain is a part of **MAG Software Portal** project, which also includes
There are two methods to prepare STB SDK on your PC:

* Just clone or download GitHub repository. The simplest one if you know what is Git.
* Use dedicated installer. This program works as a recovery disk for SDK with embedded functions of fixing broken files, its upgrading and of course installing.
* Use dedicated installer.

I don't favour any of those methods. If you want to set all dependencies automatically and make toolchain usable for first time, use installer.

Expand Down Expand Up @@ -151,14 +151,11 @@ On the `docs/` folder you can find some guides taken from Infomir website [soft.
The toolchain is going to be constantly improved so I've added a script to check for updates. To run it, when being at root directory of toolchain:

```shell
cd includes/
./checkForUpdates.sh
./includes/checkForUpdates.sh
```

Nothing more to explain, it will just check and download latest version if you want. Of course you can also update by `git pull` :)

The second method is to use installer, choose correct option from main menu, specify path to your SDK installation and that's all.

## Contribution

Every contribution is appreciated, like in entire project. For more information go to website of MAG Software Portal https://firmware.magboxes.xyz. In case of any problems you can write in any of forums listed on page (or enter new thread in your forum, which is also very appreciated) or open Issue or Pull Request in repository of SDK.
4 changes: 2 additions & 2 deletions includes/checkForUpdates.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
. ./initialize.sh
. ./message.sh
. ./includes/initialize.sh
. ./includes/message.sh
echo "[ ${OutputBlue}TRY${OutputWhite} ] Trying to check for updates..."
wget https://nepose.ml/MAG_Software_Portal/updateCheck.sh 2>/dev/null

Expand Down
26 changes: 2 additions & 24 deletions includes/initialize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,8 @@
# The script initializes the TPUT commands and sends version of toolchain & hello message. Works like a common library. Then checks if not 18.04 or 18.10 unsupported still versions are used.
# Big ask for you: DO NOT EDIT IT. ;)

function checkIfPackage() {
# $1 -> name of package to check
# $2 -> additional message to display in case of error if required

if [ $(dpkg-query -W -f='${Status}' `echo $1` 2>/dev/null | grep -c "ok installed") -eq 0 ]
then
echo "[ ${OutputRed}ERR${OutputWhite} ] The required package $1 is not installed."
[ "$2" != "" ] && echo " Additional message sent by script: $2"
read -p " Do you want to install it now? (Y/n)" install
case "$install" in
"n"|"N"|"nO"|"No"|"NO")
kill -s TERM $TOP_PID
"y"|"Y"|"yes"|"Yes"|"yES"|"yEs"|"YeS"|"YES"|"YEs"|"yeS")
sudo apt-get update
sudo apt-get install "$1"
*)
echo "[ ${OutputRed}ERR${OutputWhite} ] Invalid input. Aborting."
kill -s TERM $TOP_PID
fi

}

export STBSDK_Version="2.00.1"
export STBSDK_Date="2019-02-22"
export STBSDK_Version="2.01"
export STBSDK_Date="2019-06-10"

export OutputRed=`tput setaf 1`
export OutputGreen=`tput setaf 2`
Expand Down
6 changes: 5 additions & 1 deletion includes/message.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,23 @@ then
case "$install" in
"n"|"N"|"nO"|"No"|"NO")
kill -s TERM $TOP_PID
;;
"y"|"Y"|"yes"|"Yes"|"yES"|"yEs"|"YeS"|"YES"|"YEs"|"yeS")
sudo apt-get update
sudo apt-get install "$1"
;;
*)
echo "[ ${OutputRed}ERR${OutputWhite} ] Invalid input. Aborting."
kill -s TERM $TOP_PID
;;
esac
fi

}

. /etc/lsb-release
case "$DISTRIB_RELEASE" in
"18.04"|"18.10")
"16.10"|"17"|"17.04"|"17.10"|"18"|"18.04"|"18.10"|"19"|"19.04")
echo "[ ${OutputRed}ERR${OutputWhite} ] You are using system which bases on Ubuntu ${DISTRIB_RELEASE}. This version is unfortunately not supported now. The supported systems are Ubuntu 12.04 to 16.04 based."
exit 1
;;
Expand Down

0 comments on commit 691338c

Please sign in to comment.