Skip to content

Commit 88e67d3

Browse files
committed
add script for parsing
1 parent 8c9e8d1 commit 88e67d3

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

parse_bag.sh

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
3+
docker_image="bag2image-parser"
4+
5+
docker_status=`dpkg -l | grep docker.io | awk '{print $1}'`
6+
if [ -z $docker_status ]
7+
then
8+
echo CASE1
9+
need_install_docker=1
10+
elif [ $docker_status != "ii" ]
11+
then
12+
echo CASE2
13+
need_install_docker=1
14+
else
15+
echo
16+
need_install_docker=0
17+
fi
18+
19+
if [ need_install_docker == 1 ]
20+
then
21+
sudo apt install docker.io
22+
fi
23+
24+
found_image=`docker image ls | grep $docker_image`
25+
if [ -z $docker ]
26+
then
27+
wget https://github.com/standmit/bag2image/raw/master/parser.dockerfile
28+
docker build -t $docker_image -f parser.dockerfile .
29+
rm parser.dockerfile
30+
fi
31+
32+
docker run --mount type=bind,source=$PWD,target=/tmp/share $docker_image

0 commit comments

Comments
 (0)