File: makelink.sh

package info (click to toggle)
ppxp 0.99120923-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,812 kB
  • ctags: 3,704
  • sloc: ansic: 24,532; tcl: 3,992; makefile: 517; sh: 80
file content (31 lines) | stat: -rw-r--r-- 606 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh

if [ "$1" = "-c" ]
then
  LN='cp -pu'
  shift
else
  LN='ln -fs'
fi

echo -n new top directory[obj.`uname`]?' '
read inbuf
if [ "x$inbuf" = "x" ]
then
  LINKPATH=obj.`uname`
else
  LINKPATH=$inbuf
fi

echo -n making directories in $LINKPATH':'
find $* -type d -exec mkdir -p $LINKPATH/{} \; -exec echo ' '{} \;
echo done

echo linking source files to $LINKPATH':'
find $* -type f -exec $LN `pwd`/{} $LINKPATH/{} \; -exec echo ' '{} \;
echo done

$LN `pwd`/configure $LINKPATH/configure
$LN `pwd`/etc $LINKPATH/etc

cat `pwd`/makefile | sed -e '/^\#TOP_BEGIN/,/^\#TOP_END/d' > $LINKPATH/makefile