From b12946759ddaae1721b3a91a4ce45b279afe32cd Mon Sep 17 00:00:00 2001 From: MatMoul Date: Thu, 5 Jan 2017 00:42:34 +0100 Subject: [PATCH] Update make install (add ln g410-led, g610-led and g910-led --- makefile | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/makefile b/makefile index 5b55985..6242b0b 100644 --- a/makefile +++ b/makefile @@ -23,12 +23,9 @@ install: @sudo cp sample_profiles/* /etc/$(PROGN)/samples @sudo cp udev/$(PROGN).rules /etc/udev/rules.d @sudo cp bin/$(PROGN) /usr/bin - @sudo rm /usr/bin/g410-led - @sudo rm /usr/bin/g610-led - @sudo rm /usr/bin/g910-led - @sudo ln -s /usr/bin/$(PROGN) /usr/bin/g410-led - @sudo ln -s /usr/bin/$(PROGN) /usr/bin/g610-led - @sudo ln -s /usr/bin/$(PROGN) /usr/bin/g910-led + @sudo test -s /usr/bin/g410-led || sudo ln -s /usr/bin/$(PROGN) /usr/bin/g410-led + @sudo test -s /usr/bin/g610-led || sudo ln -s /usr/bin/$(PROGN) /usr/bin/g610-led + @sudo test -s /usr/bin/g910-led || sudo ln -s /usr/bin/$(PROGN) /usr/bin/g910-led @sudo test -s /etc/$(PROGN)/profile || sudo cp /etc/$(PROGN)/samples/group_keys /etc/$(PROGN)/profile @sudo test -s /etc/$(PROGN)/reboot || sudo cp /etc/$(PROGN)/samples/all_off /etc/$(PROGN)/reboot @sudo cp systemd/$(PROGN).service /lib/systemd/system