Skip to content

Commit

Permalink
Create I.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruv-2015 authored Dec 30, 2021
1 parent da73b79 commit feede91
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions I.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# This scripts perform installation of required dependencies on termux

#!/bin/bash

# Install nodejs git
pkg install nodejs-lts git -y

if [ $? -eq 0 ]; then
echo "Installation successful"
else
echo "Failed to install nodejs. Exiting"
exit 1
fi
git clone https://dhruv-2015:[email protected]/dhruv-2015/JTVServer
if [ $? -eq 0 ]; then
echo "Downloaded the server successfully. "
else
echo "Failed to download the server. Is wget installed?"
exit 1
fi

cd JTVServer
rm package-lock.json
if [ $? -eq 0 ]; then
echo "Opened source"
else
echo "Failed to open source. Is the directory present ? Exiting"
exit 1
fi
echo "Installing dependencies"
npm install chalk dotenv crypto-js express http-proxy node-fetch
if [ $? -eq 0 ]; then
echo "Dependencies installation successful."
else
echo "Failed to install dependencies. Exiting"
exit 1
fi
echo "Downloading start server script"
cd ~
wget https://github.com/jtvserver/jtvserver.github.io/releases/download/1.1/start.sh
if [ $? -eq 0 ]; then
echo "Script downloaded successfully"
else
echo "Failed to download start script. Please run wget https://github.com/jtvserver/jtvserver.github.io/releases/download/1.0/start.sh to download"
exit 1
fi
cd ~

0 comments on commit feede91

Please sign in to comment.