Menu

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

Download this file

29 lines (23 with data), 604 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)

cd problems_skel
ln -s ../../examples/skel/${prob}_skel.py ${prob}.py

cd $startdir

cd problems_soln
ln -s ../../examples/soln/${prob}_soln.py ${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.