Added installers and uninstallers to scripts
This commit is contained in:
parent
fa881976af
commit
eb3243ba6b
|
@ -54,7 +54,6 @@ getAmount()
|
||||||
checkInternet()
|
checkInternet()
|
||||||
{
|
{
|
||||||
echo -e "GET http://google.com HTTP/1.0\n\n" | nc google.com 80 > /dev/null 2>&1
|
echo -e "GET http://google.com HTTP/1.0\n\n" | nc google.com 80 > /dev/null 2>&1
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Author: Alexander Epstein https://github.com/alexanderepstein
|
||||||
|
echo -n "Installing currency: "
|
||||||
|
chmod a+x currency
|
||||||
|
cp currency /usr/local/bin > /dev/null 2>&1 || { echo "Failure"; echo "Error copying file, try running install script as sudo"; exit 1; }
|
||||||
|
echo "Success"
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Author: Alexander Epstein https://github.com/alexanderepstein
|
||||||
|
echo -n "Removing currency: "
|
||||||
|
rm -f /usr/local/bin/currency > /dev/null 2>&1 || { echo "Failed" ; echo "Error removing file, try running uninstall script as sudo"; exit 1; }
|
||||||
|
echo "Success"
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Author: Alexander Epstein https://github.com/alexanderepstein
|
||||||
|
cd currency
|
||||||
|
./install.sh || exit 1
|
||||||
|
cd ..
|
||||||
|
cd stocks
|
||||||
|
./install.sh
|
||||||
|
cd ..
|
||||||
|
cd weather
|
||||||
|
./install.sh
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Author: Alexander Epstein https://github.com/alexanderepstein
|
||||||
|
echo -n "Installing stocks: "
|
||||||
|
chmod a+x stocks
|
||||||
|
cp stocks /usr/local/bin > /dev/null 2>&1 || { echo "Failure"; echo "Error copying file, try running install script as sudo"; exit 1; }
|
||||||
|
echo "Success"
|
|
@ -3,7 +3,6 @@
|
||||||
checkInternet()
|
checkInternet()
|
||||||
{
|
{
|
||||||
echo -e "GET http://google.com HTTP/1.0\n\n" | nc google.com 80 > /dev/null 2>&1
|
echo -e "GET http://google.com HTTP/1.0\n\n" | nc google.com 80 > /dev/null 2>&1
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Author: Alexander Epstein https://github.com/alexanderepstein
|
||||||
|
echo -n "Removing stocks: "
|
||||||
|
rm -f /usr/local/bin/stocks > /dev/null 2>&1 || { echo "Failed" ; echo "Error removing file, try running uninstall script as sudo"; exit 1; }
|
||||||
|
echo "Success"
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Author: Alexander Epstein https://github.com/alexanderepstein
|
||||||
|
cd currency
|
||||||
|
./uninstall.sh || exit 1
|
||||||
|
cd ..
|
||||||
|
cd stocks
|
||||||
|
./uninstall.sh
|
||||||
|
cd ..
|
||||||
|
cd weather
|
||||||
|
./uninstall.sh
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Author: Alexander Epstein https://github.com/alexanderepstein
|
||||||
|
echo -n "Installing weather: "
|
||||||
|
chmod a+x weather
|
||||||
|
cp weather /usr/local/bin > /dev/null 2>&1 || { echo "Failure"; echo "Error copying file, try running install script as sudo"; exit 1; }
|
||||||
|
echo "Success"
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Author: Alexander Epstein https://github.com/alexanderepstein
|
||||||
|
echo -n "Removing weather: "
|
||||||
|
rm -f /usr/local/bin/weather > /dev/null 2>&1 || { echo "Failed" ; echo "Error removing file, try running uninstall script as sudo"; exit 1; }
|
||||||
|
echo "Success"
|
|
@ -17,7 +17,6 @@ fi
|
||||||
checkInternet()
|
checkInternet()
|
||||||
{
|
{
|
||||||
echo "GET http://google.com HTTP/1.0\n\n" | nc google.com 80 > /dev/null 2>&1
|
echo "GET http://google.com HTTP/1.0\n\n" | nc google.com 80 > /dev/null 2>&1
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
Loading…
Reference in New Issue