-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinit_rebase.sh
More file actions
executable file
·41 lines (29 loc) · 976 Bytes
/
init_rebase.sh
File metadata and controls
executable file
·41 lines (29 loc) · 976 Bytes
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
KERNEL_MAJOR_VERSION=4.9
KERNEL_VERSION=4.9.135
echo "Setting up rebase directory..."
rm -rf rebase
mkdir rebase
cd rebase
echo "Uncompressing fresh kernel..."
tar -xf ../kernel/linux-$KERNEL_MAJOR_VERSION.tar.xz
echo "Uncompressing fresh kernel subpatches..."
unxz -k ../kernel/patch-$KERNEL_VERSION.xz
cd linux-$KERNEL_MAJOR_VERSION
echo "Creating fresh git repo..."
git init
echo "Adding files to new git repo..."
git add *
echo "First commit of major kernel..."
git commit -m "baseline" >> ../../rebase.log
echo "Patching minor kernel version..."
patch -F 0 -p1 < ../../kernel/patch-$KERNEL_VERSION >> ../../rebase.log
echo "Committing minor kernel changes..."
git add *
git commit -m "update" >> ../../rebase.log
echo "Omitting patches..."
sh ../../omitted-patches/omit-patches.sh >> ../../rebase.log
echo "Committing omitted patches..."
git add *
git commit -m "omitting patches" >> ../../rebase.log
echo "Tidying up.."
rm ../../kernel/patch-$KERNEL_VERSION