bin: Renamed install-toolkit into toolkit-mgr

Signed-off-by: Andrei Jiroh Eugenio Halili <andreijiroh@madebythepins.tk>
This commit is contained in:
Andrei Jiroh Eugenio Halili 2021-04-05 17:43:48 +08:00
parent d9eef22753
commit 2e5b8a7448
Signed by: ajhalili2006
GPG Key ID: A30EBE40AD856D88
2 changed files with 24 additions and 23 deletions

View File

@ -1,23 +0,0 @@
#!/usr/bin/env bash
if echo "$OSTYPE" | grep -qE '^linux-gnu.*' && [ -f '/etc/debian_version' ]; then
PKGMGR="sudo apt-get"
else
PKGMGR="pkg"
fi
## Install Python, Wget and cURL
if echo "$OSTYPE" | grep -qE '^linux-android.*'; then
$PKGMGR install python nodejs-lts nano wget git -y
else
$PKGMGR install python3 python3-dev python3-pip nano curl wget -y
fi
## Then, install Node.js using nvm
NODEJS_INSTALL_PATH=$(command -v node)
if [[ $NODEJS_INSTALL_PATH == "" ]]; then
true
else
echo "info: Node.js is installed, skipping..."
fi

24
bin/toolkit-mgr Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash
help() {
echo "Toolkit Manager - Manage toolkit scripts - v0.1.0"
echo
echo "Usage: $0 COMMAND ARGS"
echo "Available commands:"
echo "add [URL|MODULENAME] Install new script from the Internet"
echo " and add to PATH."
echo "run [TOOLKIT] [ARGS] Run the script without using PATH"
echo "list List installed scripts"
echo "uninstall [TOOLKIT] Remove from your local ~/.toolkits/bin"
}
commandNotYetImplemented() {
echo "error: Unknown command. Try 'toolkit-mgr help' to learn more."
exit
}
if [[ $@ == "" || $@ == "help" ]]; then
help
else
commandNotYetImplemented
fi