Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created August 22, 2019 10:09
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/b8c5103c1efbf333bad85ae74dae8e66 to your computer and use it in GitHub Desktop.
Save codecademydev/b8c5103c1efbf333bad85ae74dae8e66 to your computer and use it in GitHub Desktop.
Codecademy export
#!/bin/bash
echo "Welcome, Serge"
firstline=$(head -n 1 source/changelog.md)
read -a splitfirstline <<< $firstline
version=${splitfirstline[1]}
echo "The version you are currently in is" $version
echo "If you would like to continue? (enter "1" for yes, otherwise "0" to exit)"
read versioncontinue
if [ $versioncontinue -eq 1 ]
then echo "OK"
for filename in source/*
do
echo $filename
if [ $filename == "source/secretinfo.md" ]
then
# echoed "Encrypting secretInfo in"
echo "Not copying" $filename
#
else
echo "Copying" $filename
cp $filename build/
fi
done
cd build
cd ..
echo "Build" $version "version contains:"
ls build
else echo "Please come back when you are ready"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment