-
-
Save codecademydev/fda5021dcc50767c22fce5f2f9cac99c to your computer and use it in GitHub Desktop.
Codecademy export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Welcome to 'Build Script'" | |
firstline=$(head -n 1 source/changelog.md) | |
read -a splitfirstline <<< $firstline | |
version=${splitfirstline[1]} | |
echo "Is your 'changelog' version up to date?" | |
echo "Version = " $version | |
echo "Continue?: 1 (YES) | 2 (NO)" | |
read versioncontinue | |
if [ $versioncontinue -eq 1 ] | |
then | |
echo "OK" | |
echo "" | |
else | |
echo "Please come back when you are ready" | |
exit | |
fi | |
for files in source/* | |
do | |
if [ $files != "source/secretinfo.md" ] | |
then | |
cp $files build | |
echo $files " is being copied into dir:build/" | |
fi | |
done | |
cd build/ | |
echo "" | |
echo "These are the files in dir:build/" | |
ls -a ./ | |
echo "" | |
echo '"build" of Source Code is completed. Exiting now...' | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment