blob: ea0a4dae59679903768f08d0db4dab7b552e0d51 (
plain) (
blame)
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
|
%prep
mkdir whence.tmp
pushd whence.tmp
ln -s real step3
ln -s step3 step2
ln -s step2 step1
ln -s loop loop
ln -s flip flop
ln -s flop flip
touch real
chmod +x real
prefix=$PWD
popd
%test
(
path=( $PWD/whence.tmp $path )
whence -S step1
whence -s step1
)
0q:whence symlink resolution
>$prefix/step1 -> $prefix/step2 -> $prefix/step3 -> $prefix/real
>$prefix/step1 -> $prefix/real
(
path=( $PWD/whence.tmp $path )
whence -S flip || whence -S loop || whence -s flip || whence -s loop
)
1:whence deals with symlink loops gracefully
|