-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsync
executable file
·50 lines (43 loc) · 965 Bytes
/
sync
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh
CURRDIR=`pwd`
KERNEL_DIR=$CURRDIR/linux-stable
#
# kernel version branch, at present it could be:
# kernel-4.14 : the linux-4.14.y version branch
# centos-3.10 : the centos kernel 3.10.0-862.el7
# centos-4.18 : the centos kernel 4.18.0-80.7.2.el7
#
KERNEL_BRANCH=centos-4.18
QEMU_DIR=$CURRDIR/qemu/qemu-2.12.1
QEMU_BRANCH=master
ROOTFS_DIR=$CURRDIR/rootfs/busybox
ROOTFS_BRANCH=github
# sync current git
git pull
if [ -d $KERNEL_DIR ]
then
cd $KERNEL_DIR
echo Entering into `pwd`
git pull
cd $CURRDIR
else
git clone https://github.com/wxx213/kernel-stable.git -b $KERNEL_BRANCH $KERNEL_DIR
fi
if [ -d $QEMU_DIR ]
then
cd $QEMU_DIR
echo Entering into `pwd`
git pull
cd $CURRDIR
else
git clone https://github.com/wxx213/qemu-2.12.git -b $QEMU_BRANCH $QEMU_DIR
fi
if [ -d $ROOTFS_DIR ]
then
cd $ROOTFS_DIR
echo Entering into `pwd`
git pull
cd $CURRDIR
else
git clone https://github.com/wxx213/busybox_rootfs.git -b $ROOTFS_BRANCH $ROOTFS_DIR
fi