Improve 1990/jaw/try.sh

This commit is contained in:
Cody Boone Ferguson committed 2023-11-01 05:09:48 -07:00
1 parent 8741610110
commit 8e18a44c88
1 file changed
+21 -3
+21 -3
View File
@@ -4,8 +4,26 @@ echo "Running shark.sh:"
sh shark.sh shark.sh README.md jaw.c > receive || exit 1
echo "Done."
echo "Attempting to extract files:"
mkdir -p test
cd test
# delete directory for clean state
rm -fr test
# make sure we can make the new directory
mkdir -p test || exit 0
# make sure we can cd to the new directory
cd test || exit
# run the script
echo "Attempting to extract files:"
sh ../receive
echo 1>&2
echo "$ ls -al" 1>&2
ls -al
echo 1>&2
echo "Comparing the files from the parent directory:" 1>&2
echo 1>&2
for i in *; do
echo -n " " 1>&2; diff -s "$i" ../"$i"
done