#!/bin/sh -e mkdir -p "$1/usr/lib/tcl8.6" cp -r ../tcllib "$1/usr/lib/tcl8.6/" for module in $(ls "$1/usr/lib/tcl8.6/tcllib/modules") do ln -s tcllib/modules/$module "$1/usr/lib/tcl8.6/" done