Skip to content

Commit 395f3fa

Browse files
authored
Add restore.sh script (#7284)
1 parent 648f967 commit 395f3fa

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

restore.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
3+
source="${BASH_SOURCE[0]}"
4+
5+
function is_cygwin_or_mingw()
6+
{
7+
case $(uname -s) in
8+
CYGWIN*) return 0;;
9+
MINGW*) return 0;;
10+
*) return 1;;
11+
esac
12+
}
13+
14+
# resolve $SOURCE until the file is no longer a symlink
15+
while [[ -h $source ]]; do
16+
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
17+
source="$(readlink "$source")"
18+
19+
# if $source was a relative symlink, we need to resolve it relative to the path where the
20+
# symlink file was located
21+
[[ $source != /* ]] && source="$scriptroot/$source"
22+
done
23+
24+
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
25+
"$scriptroot/eng/build.sh" --restore $@

0 commit comments

Comments
 (0)