#!/bin/sh # Extra setup after cloning an Asterisk repository. # Assumes you also cloned asterisk-tools to a near-by directory. # 'AUTHORS' is generated by './gen_authors >AUTHORS' # Extra setup to run TOOLS_DIR=`dirname $0` # FIXME: proper usage message usage() { echo >&2 "Usage: $0 " } name="$1" case "$name" in asterisk) # Use the dummy menuselect: if [ ! -d menuselect ]; then mkdir -p menuselect (cd menuselect; ln -s ../$TOOLS_DIR/menuselect/* .) make -C menuselect dummies fi ;; dahdi-tools) # A really-dummy menuselect if [ ! -d menuselect ]; then mkdir menuselect cp $TOOLS_DIR/menuselect/Makefile menuselect ln -s /bin/true menuselect/menuselect fi ;; dahdi-linux) ln -s ../../../octapi/software drivers/dahdi/oct612x if [ ! -d ../octapi ]; then echo >&2 "$0: Warning: dahdi-linux was set up, but you still need to fetch octapi." fi ;; libpri) : # Nothing special to fix. Master already set to 1.4. ;; *) usage; exit 1;; esac # Just in case you'll use git-svn here as well: if [ ! -r AUTHORS ]; then ln -s $TOOLS_DIR/AUTHORS . fi git config --add svn.authorsfile AUTHORS # Make sure we have a proper .version file after checkout / pull for hook in post-checkout post-merge; do if [ ! -r .git/hooks/$hook ]; then ln -s ../../$TOOLS_DIR/version_hook .git/hooks/$hook fi done if [ ! -r .gitignore ]; then ln -s $TOOLS_DIR/${name}_gitignore .gitignore fi