Menu

[r8989]: / trunk / py4science / workbook / add_problem  Maximize  Restore  History

Download this file

32 lines (27 with data), 685 Bytes

#!/bin/bash
#
# Add a new problem to the workbook.  This script simply creates the two
# necessary symlinks.
#
# Usage:
#
# ./add_problem NAME
#
# NOTE: NAME should NOT contain the .py extension or path, just the basename of
# the script.  For example:
#
# ./add_problem qsort
#
# assumes there is a qsort.py problem in the examples directory, with
# qsort_skel.py in the skel/ subdir and a qsort_soln.py in the soln/ subdir.

prob=$1

startdir=$(pwd)

# do the skeleton
cd problems_skel
ln -s ../../examples/skel/${prob}_skel.py ${prob}.py
svn add ${prob}.py

# now do the solution
cd $startdir
cd problems_soln
ln -s ../../examples/soln/${prob}_soln.py ${prob}.py
svn add ${prob}.py
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.