Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPT-commit: modified: src/classes/sys/sys.class, src/classes/wyxd/wyx… #48

Merged
merged 1 commit into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 39 additions & 2 deletions src/classes/sys/sys.class
Original file line number Diff line number Diff line change
Expand Up @@ -440,15 +440,52 @@ sys.dependencies.install() {
brew install xclip jq csvkit
brew tap teamookla/speedtest
brew install speedtest --force
pip3 install -r $WYX_DIR/requirements.txt
pip3 install -r "${WYX_DIR}/requirements.txt"
elif sys.os.linux; then
sys.info "Installing dependencies for Linux..."
sudo apt-get update
sudo apt-get -y install xclip jq csvkit
curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | sudo bash
sudo apt-get -y install speedtest
pip3 install -r $WYX_DIR/requirements.txt
pip3 install -r "${WYX_DIR}/requirements.txt"
else
sys.error "This OS is not supported"
fi
}

sys.dependencies.update() {
if sys.os.mac; then
sys.info "Updating dependencies for macOS..."
brew update
brew upgrade xclip jq csvkit
brew tap teamookla/speedtest
brew upgrade speedtest --force
pip3 install -r "${WYX_DIR}/requirements.txt"
elif sys.os.linux; then
sys.info "Updating dependencies for Linux..."
sudo apt-get update
sudo apt-get -y upgrade xclip jq csvkit
curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | sudo bash
sudo apt-get -y upgrade speedtest
pip3 install -r "${WYX_DIR}/requirements.txt"
else
sys.error "This OS is not supported"
fi
}

sys.dependencies.list() {
if sys.os.mac; then
sys.info "Listing dependencies for macOS..."
echo ""
sys.h1 "Brew: ${RESET}xclip, jq, csvkit, speedtest"
sys.h1 "Pip: ${RESET}$(cat "${WYX_DIR}/requirements.txt" | xargs)"
elif sys.os.linux; then
sys.info "Listing dependencies for Linux..."
echo ""
sys.h1 "Apt: ${RESET}xclip, jq, csvkit, speedtest"
sys.h1 "Pip: ${RESET}$(cat "${WYX_DIR}/requirements.txt" | xargs)"
else
sys.error "This OS is not supported"
fi
echo ""
}
8 changes: 6 additions & 2 deletions src/classes/wyxd/wyxd.class
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,13 @@ wyxd.command_info() {
echo ""
echo "v$version"
echo ""
sys.h1 "MAINTENANCE:"
echo "- sys-info ${ORANGE}: view shell info${RESET}"
sys.h1 "SYSTEM:"
echo "- sys-info ${ORANGE}: view system specs${RESET}"
echo ""
sys.h1 "DEPENDENCIES:"
echo "- install-deps ${ORANGE}: install dependencies${RESET}"
echo "- update-deps ${ORANGE}: update dependencies${RESET}"
echo "- list-deps ${ORANGE}: list dependencies${RESET}"
echo ""
sys.h1 "DIRECTORY NAVIGATION:"
echo "- cd <mydir> ${ORANGE}: navigation${RESET}"
Expand Down
3 changes: 3 additions & 0 deletions src/commands/list-deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

sys.dependencies.list
3 changes: 3 additions & 0 deletions src/commands/update-deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

sys.dependencies.update
4 changes: 3 additions & 1 deletion src/data/arg_scripts.csv
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,6 @@ install-deps,install-deps,"Install WYX-CLI dependencies",true
keystore,keystore,"Add a key-value pair to your '.env' keystore",true
setup,setup,"Setup WYX-CLI Third Party API-based utilities",true
img_stdout,img_stdout,"Output wyx STDOUT to an image",false
copy,copy,"Copy output of a command to clipboard",true,
copy,copy,"Copy output of a command to clipboard",true,
update-deps,update-deps,"Update the project dependencies",true,
list-deps,list-deps,"List the project dependencies",true,