Skip to content

Commit

Permalink
fixes for running lind install (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
yashaswi2000 authored Apr 24, 2024
1 parent 423bf42 commit 3845280
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gen_netdevs.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/bin/bash
WORKDIR=$(pwd) # Set working directory to the output of pwd
FILE="$WORKDIR/gen_netdevs" # Use the full path for the file
PARENTPATH=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) # needs the source location when being used in lind-build.

if [ -f "$FILE" ]; then
echo "$FILE exists."
else
echo "$FILE does not exist. Compiling."
gcc "$WORKDIR/gen_netdevs.c" -o "$WORKDIR/gen_netdevs"
gcc "$PARENTPATH/gen_netdevs.c" -o "$WORKDIR/gen_netdevs"
if [ $? -ne 0 ]; then # Check if gcc succeeded
echo "Compilation failed."
exit 1
Expand Down

0 comments on commit 3845280

Please sign in to comment.