Build a Build Script: 9/13

Just after keying “1” i get the following error -

“./ line23: syntax error near unexpected token ‘else’
./ line 23 'else”

#Banner Message
echo “Let’s get building!!!”

firstline=$(head -n 1 source/
read -a splitfirstline <<< $firstline

echo “You are building version” $version

echo ‘Do you want to continue? (enter “1” for Yes, “0” for No)’
read versioncontinue

#Condition to Version Continue
if [ $versioncontinue -eq 1 ]
echo “OK”
for filename in source/*
do echo $filename
if ["$filename" == “source/”] then
echo “Not copying” $filename
echo “Copying” $filename
echo “Please come back when you are ready”

Any help or advice is appreciated

Hello @bboycpu.

Welcome to the forum!

In the line above, then needs to be on the next line like you have it here:

Happy coding!

1 Like

Thanks! Thank you so much. I’ve been working on that problem for days. Thanks :blush::pray:t3::blush:

1 Like

You are very welcome!

This topic was automatically closed after 23 hours. New replies are no longer allowed.