Skip to content

Commit f9469c5

Browse files
committed
Updating tests and docstrings, adding validation
1 parent 1f7de1a commit f9469c5

File tree

3 files changed

+661
-557
lines changed

3 files changed

+661
-557
lines changed

modsim/build.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/sh
2+
3+
# Exit on any error
4+
set -e
5+
6+
# Get the directory where this script is located
7+
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
8+
CANONICAL_FILE="$SCRIPT_DIR/modsim.py"
9+
10+
# Function to copy if destination exists
11+
copy_if_exists() {
12+
dest="$1"
13+
if [ -f "$dest" ]; then
14+
echo "Copying to $dest"
15+
cp "$CANONICAL_FILE" "$dest"
16+
fi
17+
}
18+
19+
# Copy to root directory
20+
copy_if_exists "$SCRIPT_DIR/../modsim.py"
21+
22+
# Copy to chapters directory
23+
copy_if_exists "$SCRIPT_DIR/../chapters/modsim.py"
24+
25+
# Copy to examples directory
26+
copy_if_exists "$SCRIPT_DIR/../examples/modsim.py"
27+
28+
# Copy to ModSimPySolutions directory and its subdirectories
29+
copy_if_exists "$SCRIPT_DIR/../ModSimPySolutions/modsim.py"
30+
copy_if_exists "$SCRIPT_DIR/../ModSimPySolutions/examples/modsim.py"
31+
copy_if_exists "$SCRIPT_DIR/../ModSimPySolutions/chapters/modsim.py"
32+
33+
echo "Done copying modsim.py to all locations"

0 commit comments

Comments
 (0)