Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/QRX53/Q
Browse files Browse the repository at this point in the history
  • Loading branch information
44million committed Dec 5, 2023
2 parents 588de86 + 65561d0 commit f818366
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ curl -sSL "https://raw.githubusercontent.com/QRX53/Q/main/dwn/install-*nix" | su

This command will download the installation script, and execute it. Please note, if you do
not want to run this command without knowing what the script does, download the script manually. If all goes well, you
should see the following: `[INFO] Q software installed successfully.` This means your installation went well, and you
are ready to move on.
should see something along the lines of: `Installation complete!`. This means your installation went well, and you are ready to move on.

## Getting Started With Q

Expand Down
23 changes: 15 additions & 8 deletions dwn/install-*nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ function print_red() {
echo -e "$(tput setaf 1)$1$(tput sgr0)"
}

# Check if 'q' or 'Q' directory exists, if yes, create a temporary folder
if [ -d "q" ] || [ -d "Q" ]; then
TMP_DIR=$(mktemp -d -t q_temp.XXXXXX)
cd "$TMP_DIR" || exit 1
fi

# Step 1: Download the latest release file
echo
echo "Downloading the latest release file..."
Expand Down Expand Up @@ -42,23 +48,24 @@ fi

# Step 4: Update PATH
echo
"Updating PATH..."
if echo 'export PATH="/usr/local/bin/q:$PATH"' >> ~/.bashrc && source ~/.bashrc; then
echo "Updating PATH..."

{
export PATH="/usr/local/bin/q:$PATH"
print_green "PATH updated."
else
print_red "Error updating PATH. Exiting."
exit 1
fi
} || {
print_red "Failed to update path."
}

# All steps completed
echo
print_green "Installation complete!"

# Clean up: Remove the downloaded jar file
echo
"Cleaning up..."
echo "Cleaning up..."
if rm Q.jar; then
print_green "Clean up complete."
print_green "Post install clean up complete."
else
print_red "Error cleaning up. Please remove 'Q.jar' manually."
fi
Expand Down

0 comments on commit f818366

Please sign in to comment.