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)
|
# Move packwiz executable to a system directory (you may need sudo)
|
||||||
sudo mv packwiz /usr/local/bin/packwiz
|
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
|
# Add packwiz to the system path
|
||||||
echo 'export PATH="$PATH:/usr/local/bin"' >> ~/.bashrc
|
if [[ ! ":$PATH:" == *":/usr/local/bin:"* ]]; then
|
||||||
source ~/.bashrc
|
echo 'export PATH="$PATH:/usr/local/bin"' >> ~/.bashrc
|
||||||
|
fi
|
||||||
|
|
||||||
# Generate autocompletion script
|
# Generate autocompletion script
|
||||||
packwiz completion bash > ~/.packwiz
|
packwiz completion bash > ~/.packwiz
|
||||||
echo 'source ~/.packwiz' >> ~/.bashrc
|
echo 'source ~/.packwiz' >> ~/.bashrc
|
||||||
|
source ~/.bashrc
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to create symlink for pre-commit hook
|
# Function to create symlink for pre-commit hook
|
||||||
|
@ -25,6 +29,9 @@ create_symlink() {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Delete old symlink
|
||||||
|
rm -f "$(pwd)/.git/hooks/post-commit"
|
||||||
|
|
||||||
# Create symlink for pre-commit hook
|
# Create symlink for pre-commit hook
|
||||||
ln -s "$(pwd)/scripts/hooks/post-commit" "$(pwd)/.git/hooks/post-commit"
|
ln -s "$(pwd)/scripts/hooks/post-commit" "$(pwd)/.git/hooks/post-commit"
|
||||||
|
|
||||||
|
|
Reference in a new issue