extract-docker: Remove leading slashes when removing an earlier copy

If extracting from an absolute path within the image, like
/opt/llvm-mingw, it will still be extracted into opt/llvm-mingw in
the local directory.
This commit is contained in:
Martin Storsjö committed 2018-06-12 10:04:55 +03:00
1 parent 86cc330999
commit 951796aeb7
1 file changed
+1 -1
+1 -1
View File
@@ -12,5 +12,5 @@ fi
image=$1
dir=$2
rm -rf $dir
rm -rf $(echo $dir | sed 's,^/,,')
docker run --rm $image tar -cf - $dir | tar -xvf -