Skip to content

Commit

Permalink
Restyle Makefile again, fix bug with minus option.
Browse files Browse the repository at this point in the history
  • Loading branch information
Camille Scholtz committed Jul 2, 2016
1 parent 5d60742 commit d3d361c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ install:
$(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/neet
$(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/fish/completions
$(INSTALL_PROG) neet $(DESTDIR)$(PREFIX)/bin/neet
$(INSTALL_FILE) config/* $(DESTDIR)$(PREFIX)/share/neet
$(INSTALL_FILE) completions/* $(DESTDIR)$(PREFIX)/share/fish/completions
$(INSTALL_FILE) config/config $(DESTDIR)$(PREFIX)/share/neet/config
$(INSTALL_FILE) config/list $(DESTDIR)$(PREFIX)/share/neet/list
$(INSTALL_FILE) completions/neet.fish $(DESTDIR)$(PREFIX)/share/fish/completions/neet.fish

uninstall:
$(RM) $(DESTDIR)$(PREFIX)/bin/neet
Expand Down
6 changes: 3 additions & 3 deletions neet
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ if test (count $argv) -eq 1
info
case '+*'
# Fail if there is a non + character in argv
if test -n (string trim -c '+' $argv[1])
if test -n (string trim -c '+' $argv)
echo 'Invalid option, use -h for help.'
exit 1
end
Expand All @@ -236,7 +236,7 @@ if test (count $argv) -eq 1
end
case '-*'
# Fail if there is a non - character in argv
if test -n (string trim -c '-' -- $argv[1])
if test -n (string trim -c '-' -- $argv)
echo 'Invalid option, use -h for help.'
exit 1
end
Expand All @@ -245,7 +245,7 @@ if test (count $argv) -eq 1

# Get current episode and decrement it by one
set amount (string length -- $argv)
set decrement (math $current + 1 - $amount)
set decrement (math $current - $amount)

if test $decrement -ge 1
sed -i "s/+ $current\/$total/+ $decrement\/$total/" $configdir/list
Expand Down

0 comments on commit d3d361c

Please sign in to comment.