for test_path in $(echo -e "/usr/local/sbin\n/usr/local/bin\n/usr/sbin\n/usr/bin\n/sbin\n/bin\n/usr/games\n/usr/bin\n/bin\n/usr/sbin\n/sbin\n/usr/local/bin\n/usr/X11/bin\n/Applications\n/opt/syb/sigma/bdj/jvm/bin\n/usr/bin/X11\n/opt/syb/app/bin\n/opt/syb/app/sbin\n/opt/syb/sigma/bin\n/nmt/apps"); do
if [[ -d "$test_path" && "$initial_path" != *:$test_path:* ]]; then
echo -e "Information: adding $test_path to your paths list";
new_path="$new_path:$test_path";
fi
done
PATH="$new_path";
export PATH="$new_path";
echo -e "Information: this is your current paths list:\n$PATH";
# Check for Transmission
if [ -d /share/Apps/Transmission ]; then
echo 'Information: transmission is installed';
else
echo 'Error: transmission is not installed, you must install it from CSI before';
fi
# Check for opkg
if [ -f "/usr/local/bin/opkg" ]; then
echo 'Information: opkg is installed';
# Check for an internet connection
if [ "$(wget -qO- -T 5 http://repository.nmtinstaller.com/appinit_version)" != "" ]; then
internet="yes"
echo 'Information: internet connection avaiable';
else
internet="no"
echo 'Warning: no internet connection';
fi
# Try to update opkg
if [ "$internet" == "yes" ]; then
echo 'Information: updating opkg';
opkg update;
wait
else
echo 'Warning: i can not update opkg without internet connection';
fi
# Check for unzip and try to install it
if [ ! -f "/usr/local/bin/unzip" ]; then
echo 'Information: unzip (CSI version) is not installed';
if [ "$internet" == "yes" ]; then
echo 'Installing unzip';
opkg install unzip;
wait;
else
echo 'Error: i can not install unzip without internet connection';
fi
else
echo 'Information: unzip (CSI version) is already installed';
fi
# Check for unrar and try to install it
if [ ! -f "/usr/local/bin/unrar" ]; then
echo 'Information: unrar is not installed';
if [ "$internet" == "yes" ]; then
echo 'Installing unrar'
opkg install unrar;
wait;
else
echo 'Error: i can not install unrar without internet connection';
fi
else
echo 'Information: unrar is already installed';
fi
# Check for wget and try to install it
if [ ! -f "/usr/local/bin/wget" ]; then
echo 'Information: wget (CSI version) is not installed';
if [ "$internet" == "yes" ]; then
echo 'Installing wget'
opkg install wget;
wait;
else
echo 'Error: i can not install wget without internet connection';
fi
else
echo 'Information: wget (CSI version) is already installed';
fi
# Check for bash and try to install it
if [ "$hw" == "old" ]; then
if [ ! -f "/usr/local/bin/bash" ]; then
echo 'Information: bash (CSI version) is not installed';