Skip to content

Commit

Permalink
fix: surrealdb install
Browse files Browse the repository at this point in the history
  • Loading branch information
enricorotundo committed Feb 11, 2025
1 parent 1c188d0 commit 5d48a7c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ install_surrealdb() {
# Install SurrealDB
curl -sSf https://install.surrealdb.com | sh

if [ -f "$SURREALDB_BINARY" ]; then
if [ -f "/usr/local/bin/surreal" ]; then
echo "Moving SurrealDB binary to /usr/local/bin..." | log_with_service_name "SurrealDB" $GREEN
sudo mv "$SURREALDB_BINARY" /usr/local/bin/surreal
sudo mv /usr/local/bin/surreal "$SURREALDB_BINARY"
if [ $? -ne 0 ]; then
echo "Failed to move SurrealDB binary. Trying to copy instead..." | log_with_service_name "SurrealDB" $YELLOW
sudo cp "$SURREALDB_BINARY" /usr/local/bin/surreal
sudo cp /usr/local/bin/surreal "$SURREALDB_BINARY"
if [ $? -ne 0 ]; then
echo "Failed to copy SurrealDB binary. Installation failed." | log_with_service_name "SurrealDB" $RED
exit 1
Expand Down

0 comments on commit 5d48a7c

Please sign in to comment.