This commit is contained in:
2025-06-15 21:27:21 +02:00
parent bb39f3e3f2
commit 29a06d2bb4
3 changed files with 26 additions and 29 deletions

View File

@@ -20,8 +20,14 @@ fi
# Echo a success message
echo "Build successful!"
mkdir -p ~/hero/bin/
cp target/debug/herodo ~/hero/bin/herodo
if [ "$EUID" -eq 0 ]; then
echo "Running as root, copying to /usr/local/bin/"
cp target/debug/herodo /usr/local/bin/herodo
else
echo "Running as non-root user, copying to ~/hero/bin/"
mkdir -p ~/hero/bin/
cp target/debug/herodo ~/hero/bin/herodo
fi
# Check if a script name was provided
if [ $# -eq 1 ]; then