From d8be87ef0251844046ce3204b71596164dfa541f Mon Sep 17 00:00:00 2001 From: UTkarsh Maheshwari Date: Thu, 2 Nov 2017 18:01:10 +0530 Subject: [PATCH] Allow updating with bitsnet via make --- install | 123 -------------------------------------------------------- util.sh | 2 +- 2 files changed, 1 insertion(+), 124 deletions(-) delete mode 100755 install diff --git a/install b/install deleted file mode 100755 index 7a0df0b..0000000 --- a/install +++ /dev/null @@ -1,123 +0,0 @@ -#!/bin/bash - -sudo -v - -echo "Installing BITSnet Login" - -echo -echo "Checking dependencies" -echo - -# Check if wget installed -echo -n "Checking if wget installed... " -if ! which wget > /dev/null ; then - echo "no" - echo "wget not installed" - exit 1 -else - echo "yes" -fi -# Check if git installed for update -echo -n "Checking if git installed... " -if ! which git > /dev/null ; then - echo "no" - echo "git not installed" - exit 1 -else - echo "yes" -fi -# Check if libnotify installed -echo -n "Checking if libnotify installed... " -if ! which notify-send > /dev/null ; then - echo "no" - echo "libnotify not installed" - exit 1 -else - echo "yes" -fi - -echo -echo "All dependencies satisfied" -echo - - -echo -n "Copying script... " -# Copy the script to executables -if [ ! -d /usr/lib/bitsnet ]; then - if ! sudo mkdir /usr/lib/bitsnet - then - echo "failed" - exit 1 - fi -fi -if ! sudo cp ./util.sh /usr/lib/bitsnet/util.sh -then - echo "failed" - exit 1 -fi -if ! sudo cp ./bitsnet /usr/bin/bitsnet -then - echo "failed" - exit 1 -fi -echo "done" - - -# Copy config file to the etc -echo -n "Copying config file to etc... " -if [ ! -d /etc/bitsnet ]; then - if ! sudo mkdir /etc/bitsnet - then - echo "failed" - exit 1 - fi -fi -if ! sudo cp ./bitsnetrc /etc/bitsnet/bitsnetrc -then - echo "failed" - exit 1 -fi -echo "done" - - -# Create a desktop file -echo -n "Creating app launcher... " -if ! sudo cp ./bitsnet.desktop /usr/share/applications/bitsnet.desktop -then - echo "failed" - exit 1 -else - echo "done" -fi - -# Set to autostart -echo -n "Setting up autologin... " -if [ ! -d ~/.config/autostart ]; then - if ! mkdir -p ~/.config/autostart - then - echo "failed" - exit 1 - fi -fi -if ! ln -sf /usr/share/applications/bitsnet.desktop ~/.config/autostart/bitsnet.desktop -then - echo "failed" - exit 1 -fi -echo "done" - - -# Create manpage -echo -n "Creating man page... " -if ! sudo cp ./bitsnet.1.gz /usr/share/man/man1/ -then - echo "failed" - exit 1 -else - echo "done" -fi - -echo -echo "BITSnet Login installed" -echo "run man bitsnet for usage" -exit 0 diff --git a/util.sh b/util.sh index e57fbd1..cd540db 100644 --- a/util.sh +++ b/util.sh @@ -115,7 +115,7 @@ function update { git clone --depth=1 https://github.com/OSDLabs/BitsnetLogin cd BitsnetLogin || exit 1 debug_msg "Installing" - ./install + sudo make install echo "Updated" cd /tmp || exit 1 rm -rf BitsnetLogin