Skip to content

Commit

Permalink
v0.5.8:
Browse files Browse the repository at this point in the history
- fix: removed comments in install.sh
- tweak: added quotes around variables
  • Loading branch information
atar-axis committed Mar 31, 2019
1 parent 285eda6 commit 0f13dd8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
0.5.7
0.5.8
14 changes: 7 additions & 7 deletions install.sh
Expand Up @@ -21,22 +21,22 @@ sed -i 's/#define DRV_VER "@DO_NOT_CHANGE@"/#define DRV_VER "'$VERSION'"/g' hid-

INSTALLED=$(dkms status 2>/dev/null | grep '^hid-xpadneo,' 2>/dev/null | sed -E 's/^hid-xpadneo, ([0-9]+.[0-9]+.[0-9]+).*installed/\1/')

#if [[ -z "$INSTALLED" ]]; then
if [[ -z "$INSTALLED" ]]; then

echo "* copying module into /usr/src"
cp --recursive $PWD/hid-xpadneo/ /usr/src/hid-xpadneo-$VERSION
cp --recursive "$PWD/hid-xpadneo/ /usr/src/hid-xpadneo-$VERSION"

echo "* adding module to DKMS"
dkms add -m hid-xpadneo -v $VERSION
dkms add -m hid-xpadneo -v "$VERSION"

echo "* installing module (using DKMS)"
dkms install -m hid-xpadneo -v $VERSION
dkms install -m hid-xpadneo -v "$VERSION"

#else
else

# echo "already installed!"
echo "already installed!"

#fi
fi

# restore original files
mv hid-xpadneo/dkms.conf_bck hid-xpadneo/dkms.conf
Expand Down
4 changes: 2 additions & 2 deletions uninstall.sh
Expand Up @@ -19,8 +19,8 @@ do
echo "* $instance"

echo " * uninstalling and removing $instance from DKMS"
dkms remove -m hid-xpadneo -v $instance --all
dkms remove -m hid-xpadneo -v "$instance" --all

echo " * removing $instance folder from /usr/src"
rm --recursive /usr/src/hid-xpadneo-$instance/
rm --recursive "/usr/src/hid-xpadneo-$instance/"
done
4 changes: 2 additions & 2 deletions update.sh
Expand Up @@ -11,11 +11,11 @@ VERSION=$(cat VERSION)
IS_GIT=$(git rev-parse --is-inside-work-tree 2>/dev/null)


if [[ $LATEST == $VERSION ]]; then
if [[ $LATEST == "$VERSION" ]]; then

echo "Looks like the repo is up to date, fine!"

if [[ $LATEST == $INSTALLED ]]; then
if [[ $LATEST == "$INSTALLED" ]]; then
echo "You have already installed the latest version! Yay."
else
echo "* uninstalling outdated modules"
Expand Down

0 comments on commit 0f13dd8

Please sign in to comment.