#!/bin/sh

# cp_macsbug from-dir to-dir

if [ "$1" == "" -o ! -d "$1" ]; then
    echo "Specify the MacsBug directory you want to copy."
else 
    if [ "$2" == "" ]; then
	echo "Specify directory you want to create to hold MacsBug stuff."
    else 
	mkdir -p "$2"
	cp "$1"/ChangeLog	  "$2"/
	cp "$1"/cp_macsbug	  "$2"/
	cp "$1"/*.[ch]            "$2"/
	cp "$1"/MacsBug_testing.i "$2"/
	cp "$1"/README.*          "$2"/
	cp "$1"/Makefile          "$2"/
	cp "$1"/gdbinit-MacsBug   "$2"/
	cp "$1"/gdbinit-MacsBug-without-plugin "$2"
    
	mkdir -p "$2"/gdb_plugin_support
	cp "$1"/gdb_plugin_support/ChangeLog     "$2"/gdb_plugin_support/
	cp "$1"/gdb_plugin_support/*.[ch]        "$2"/gdb_plugin_support/
	cp "$1"/gdb_plugin_support/gdb_testing.i "$2"/gdb_plugin_support/
	cp "$1"/gdb_plugin_support/Makefile      "$2"/gdb_plugin_support/
    fi
fi
