aboutsummaryrefslogtreecommitdiffstats
path: root/lava-master/device-types-patch/patch-device-type.sh
blob: 2e1a0c5ad95e7d1f6f57710f246e81a795e23168 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

DEVTYPE_PATH=/etc/lava-server/dispatcher-config/device-types/
if [ -e /usr/share/lava-server/device-types/ ];then
	DEVTYPE_PATH=/usr/share/lava-server/device-types/
fi

cd $DEVTYPE_PATH
for patch in $(ls /root/device-types-patch/*patch)
do
	echo "DEBUG: patch with $patch"
	sed -i 's,lava_scheduler_app/tests/device-types/,,' $patch
	sed -i 's,etc/dispatcher-config/device-types/,,' $patch
	patch -p1 < $patch || exit $?
done
chown -R lavaserver:lavaserver $DEVTYPE_PATH