-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
11 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,49 @@ | ||
#!/bin/sh | ||
|
||
echo "Installing BITSnet Login" | ||
|
||
# Check if wget installed | ||
echo "Checking if wget installed" | ||
if ! which wget > /dev/null ; then | ||
echo "wget not installed" | ||
exit | ||
fi | ||
# Check if git installed for update | ||
echo "Checking if git installed" | ||
if ! which git > /dev/null ; then | ||
echo "git not installed" | ||
exit | ||
fi | ||
# Check if nmcli installed | ||
echo "Checking if nmcli installed" | ||
if ! which nmcli > /dev/null ; then | ||
echo "nmcli not installed" | ||
exit | ||
fi | ||
|
||
# Copy config file to the right place | ||
if ! ls -a ~ | grep .bitsnetrc > /dev/null ; then | ||
if ! ls -a ~ | grep -x ".bitsnetrc" --quiet ; then | ||
echo "Copying bitsnetrc" | ||
cp ./bitsnetrc ~/.bitsnetrc | ||
fi | ||
|
||
# Copy the script to executables | ||
if [ ! -d ~/.local/lib/bitsnet ]; then | ||
mkdir ~/.local/lib/bitsnet | ||
fi | ||
echo "Copying script" | ||
cp ./util.sh ~/.local/lib/bitsnet/util.sh | ||
cp ./bitsnet ~/.local/bin/bitsnet | ||
|
||
# Create a desktop file | ||
echo "Creating app launcher" | ||
cp ./bitsnet.desktop ~/.local/share/applications/bitsnet.desktop | ||
|
||
# Set to autostart | ||
echo "Setting up autologin" | ||
if [ ! -d ~/.config/autostart ]; then | ||
mkdir -p ~/.config/autostart | ||
fi | ||
ln -sf ~/.local/share/applications/bitsnet.desktop ~/.config/autostart/bitsnet.desktop | ||
|
||
# Create a man page | ||
# To Be Done | ||
# TODO: Create a man page |