Skip to content

Commit

Permalink
install: fix duplicate codes in ~/.bash_profile after reinstall
Browse files Browse the repository at this point in the history
Signed-off-by: Kinglong Mee <[email protected]>
  • Loading branch information
kinglongmee committed Sep 20, 2016
1 parent 99166ae commit 5871e3d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@ endif

install:
cp -f hid-rapoo.ko /lib/modules/`uname -r`/kernel/drivers/hid/
depmod
cat installdriver.sh >> ~/.bash_profile
@depmod
@grep -rn hid-rapoo ~/.bash_profile > /dev/null; \
if [ $$? -eq 1 ]; then \
cat installdriver.sh >> ~/.bash_profile; \
fi

clean:
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions
Expand Down
2 changes: 1 addition & 1 deletion installdriver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

rmmod hid-rapoo hid-generic
modprobe hid-rapoo
modprobe hid-generic
modprobe hid-generic

0 comments on commit 5871e3d

Please sign in to comment.