From 9b4c5a07e8c54690eb92de36c294fc98c680ecec Mon Sep 17 00:00:00 2001 From: Melyns <60199831+Melyns@users.noreply.github.com> Date: Sun, 15 Sep 2024 09:33:17 +0100 Subject: [PATCH] update --- build | 1 - build.sh | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) delete mode 100644 build create mode 100644 build.sh diff --git a/build b/build deleted file mode 100644 index 16366f3..0000000 --- a/build +++ /dev/null @@ -1 +0,0 @@ -gcc -o geofind geofind.c -lcurl -ljson-c diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..09517dc --- /dev/null +++ b/build.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# Compile +gcc -o geofind geofind.c -lcurl -ljson-c + +# check if the compilation was successful +if [ $? -eq 0 ]; then + # move the binary to /usr/local/bin + sudo mv geofind /usr/local/bin + echo "geofind was installed successfully." +else + echo "Compilation failed." + exit 1 +fi