Skip to content

Instantly share code, notes, and snippets.

View detjensrobert's full-sized avatar

Robert Detjens detjensrobert

View GitHub Profile
@detjensrobert
detjensrobert / p3testscript-improved.sh
Last active June 8, 2023 05:51
CS344 Program 3 (smallsh) test script -- but better!
#!/bin/bash
BIN_DIR=.
if [ ! -e $BIN_DIR/smallsh ]; then
# try going up a dir if binaries not found
BIN_DIR=..
fi
POINTS=0
@detjensrobert
detjensrobert / p5testscript-improved.sh
Last active June 8, 2023 05:51
CS344 Program 5 test script, but better!
#!/bin/bash
# If test stuff is under a different dir from the binaries (e.g. test/),
# set BIN_DIR to relative path from script to binaries (e.g. ..)
BIN_DIR=.
if [ ! -e $BIN_DIR/enc_server ]; then
# try going up a dir if binaries not found
BIN_DIR=..
fi