forked from nmenon/kernel_patch_verify
-
Notifications
You must be signed in to change notification settings - Fork 0
/
kpv
executable file
·29 lines (27 loc) · 910 Bytes
/
kpv
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
#!/bin/bash
# Check if Docker image exists
IMG_NAME=arm-kernel-dev
# Check if docker exists
docker=`which docker`
if [ -z "$docker" ]; then
echo "Please install Docker and Image arm-kernel-dev from:" `dirname $0`
exit 1
fi
dimg=`docker image ls | grep arm-kernel-dev`
if [ -z "$dimg" ]; then
echo "Please install Docker Image arm-kernel-dev from: cd" `dirname $0` ";make"
exit 1
fi
ccache=`which ccache`
if [ -z "ccache" ]; then
if [ ! -d "/tmp/ccache" ]; then
mkdir /tmp/ccache
fi
CCACHEDIR=/tmp/ccache
else
CCACHEDIR=`ccache -s|grep "cache directory"|sed -e "s/\s\s*/ /g"|cut -d ' ' -f3`
fi
# If we wanted to get to bash shell:
# docker run --rm -ti -v /tmp:/tmp -v /opt:/opt -v "$CCACHEDIR":/ccache -v `pwd`:/workdir arm-kernel-dev bash
# but, lets just run the script
docker run --rm -ti -v /tmp:/tmp -v /opt:/opt -v "$CCACHEDIR":/ccache -v `pwd`:/workdir arm-kernel-dev kernel_patch_verify $*