made some modifications to the dev.sh
script, to prevent redundant behavior
This commit is contained in:
parent
30e4c88c65
commit
8d3b945825
1 changed files with 9 additions and 2 deletions
|
@ -7,14 +7,18 @@ install_packwiz() {
|
|||
|
||||
# Move packwiz executable to a system directory (you may need sudo)
|
||||
sudo mv packwiz /usr/local/bin/packwiz
|
||||
sudo chmod +x /usr/local/bin/packwiz
|
||||
sudo chmod 111 /usr/local/bin/packwiz
|
||||
|
||||
# Add packwiz to the system path
|
||||
if [[ ! ":$PATH:" == *":/usr/local/bin:"* ]]; then
|
||||
echo 'export PATH="$PATH:/usr/local/bin"' >> ~/.bashrc
|
||||
source ~/.bashrc
|
||||
fi
|
||||
|
||||
# Generate autocompletion script
|
||||
packwiz completion bash > ~/.packwiz
|
||||
echo 'source ~/.packwiz' >> ~/.bashrc
|
||||
source ~/.bashrc
|
||||
}
|
||||
|
||||
# Function to create symlink for pre-commit hook
|
||||
|
@ -25,6 +29,9 @@ create_symlink() {
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Delete old symlink
|
||||
rm -f "$(pwd)/.git/hooks/post-commit"
|
||||
|
||||
# Create symlink for pre-commit hook
|
||||
ln -s "$(pwd)/scripts/hooks/post-commit" "$(pwd)/.git/hooks/post-commit"
|
||||
|
||||
|
|
Reference in a new issue