18 lines
320 B
Bash
18 lines
320 B
Bash
#!/bin/sh
|
|
|
|
if [ ! -d $1 ]; then
|
|
echo "Usage: svdepcalc /path/to/your/service/directory"
|
|
exit 111
|
|
fi
|
|
|
|
cd $1
|
|
for DIR in *; do rm -rf $DIR/downdeps; done
|
|
for DIR in *; do
|
|
if [ -d $DIR/updeps ]; then
|
|
for DEP in $DIR/updeps/*; do
|
|
mkdir -p $DEP/downdeps
|
|
ln -s `pwd`/$DIR $DEP/downdeps
|
|
done
|
|
fi
|
|
done
|