-
Notifications
You must be signed in to change notification settings - Fork 0
Create ~/bin depending on permissions yes/no dialog #25
Copy link
Copy link
Open
Labels
internal-documentationPlace for me to describe what I want the script to do before I actual do anything.Place for me to describe what I want the script to do before I actual do anything.
Description
If yes, then keep the current directory:
~/bin or /usr/local/sbin
If no, and using local permission do
#!/bin/bash
# Create a 'bin' directory in your home directory if it doesn't exist
mkdir -p ~/bin
# Add the 'bin' directory to your PATH if not already added
if [[ ":$PATH:" != *":$HOME/bin:"* ]]; then
echo 'export PATH="$PATH:$HOME/bin"' >> ~/.bashrc
fi
# Apply changes to the current session
source ~/.bashrc
echo "Setup complete. 'bin' directory added to PATH."
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
internal-documentationPlace for me to describe what I want the script to do before I actual do anything.Place for me to describe what I want the script to do before I actual do anything.