tTabs for indentation - scholarref - tools for DOI and BiBTeX reference extraction, fetching, and parsing
(HTM) git clone git://src.adamsgaard.dk/scholarref
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit d02e9d3ec5ed6148ae8ad63367c5cd67446c54b7
(DIR) parent bb50854f5defc3c37d2a375518a9a9b4515e2c80
(HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Sat, 7 Sep 2019 06:16:03 +0200
Tabs for indentation
Diffstat:
M scholarref | 42 ++++++++++++++++----------------
1 file changed, 21 insertions(+), 21 deletions(-)
---
(DIR) diff --git a/scholarref b/scholarref
t@@ -2,29 +2,29 @@
addref=0
while :; do
- case "$1" in
- -a|--add)
- addref=1
- ;;
- --) # end all options
- shift
- break
- ;;
- -?*)
- die 'Error: Unknown option specified'
- ;;
- *) # No more options
- break
- esac
- shift
+ case "$1" in
+ -
+ -a|--add)
+ addref=1
+ ;;
+ --) # end all options
+ shift
+ break
+ ;;
+ -?*)
+ die 'Error: Unknown option specified'
+ ;;
+ *) # No more options
+ break
+ esac
+ shift
done
if [ "$addref" = 1 ]; then
- getdoi "$@" | getref -n >> "$BIB"
- key="$(grep '@.*{' "$BIB" | tail -n 1 | sed 's/.*{//;s/,$//')"
- echo "Citation $key added to $BIB"
- notify-send "${0##/*} Citation $key added"
+ getdoi "$@" | getref -n >> "$BIB"
+ key="$(grep '@.*{' "$BIB" | tail -n 1 | sed 's/.*{//;s/,$//')"
+ echo "Citation $key added to $BIB"
+ notify-send "${0##/*} Citation $key added"
else
- getdoi "$@" | getref -n
+ getdoi "$@" | getref -n
fi
-exit 0