Commit | Line | Data |
---|---|---|
3c2a0909 S |
1 | #!/bin/sh |
2 | # Support selinux version | |
3 | # replace_directory dst src | |
4 | DST="$1/$2" | |
5 | SRC="$1/$3" | |
6 | ||
7 | if [ "x${DST}" == "x${SRC}" ] | |
8 | then | |
9 | #echo "${DST} and ${SRC} is same" | |
10 | exit 0 | |
11 | else | |
12 | if [ -d ${SRC} ] | |
13 | then | |
14 | if [ -L ${DST} ] | |
15 | then | |
16 | rm -f ${DST} | |
17 | fi | |
18 | ln -s $(basename ${SRC}) ${DST} | |
19 | else | |
20 | echo "${SRC} does not exit" | |
21 | exit -1 | |
22 | fi | |
23 | fi | |
24 |