Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created September 14, 2020 15:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codecademydev/fda5021dcc50767c22fce5f2f9cac99c to your computer and use it in GitHub Desktop.
Save codecademydev/fda5021dcc50767c22fce5f2f9cac99c to your computer and use it in GitHub Desktop.
Codecademy export
#!/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