summaryrefslogtreecommitdiffstats
path: root/lass/5pkgs/acronym
diff options
context:
space:
mode:
authorlassulus <lass@aidsballs.de>2016-04-13 16:48:32 +0200
committerlassulus <lass@aidsballs.de>2016-04-13 16:48:32 +0200
commit2e8743934061ecb8019c34ee4b1010238e158bf1 (patch)
tree90ff819cb846d643322b849e15b2541ecd63b0e6 /lass/5pkgs/acronym
parent9717e5a2e0cb5b0bf9fae0ec62423af30ecd2051 (diff)
l 5 acronym: refactor code
Diffstat (limited to 'lass/5pkgs/acronym')
-rw-r--r--lass/5pkgs/acronym/default.nix11
1 files changed, 7 insertions, 4 deletions
diff --git a/lass/5pkgs/acronym/default.nix b/lass/5pkgs/acronym/default.nix
index 53d5d015a..9f6f95587 100644
--- a/lass/5pkgs/acronym/default.nix
+++ b/lass/5pkgs/acronym/default.nix
@@ -1,13 +1,16 @@
{ pkgs, ... }:
pkgs.writeScriptBin "acronym" ''
+
#! ${pkgs.bash}/bin/bash
acro=$1
curl -s http://www.acronymfinder.com/$acro.html \
- | grep 'class="result-list__body__rank"' \
- | sed 's/.*title="\([^"]*\)".*/\1/' \
- | sed 's/^.* - //' \
- | sed "s/&#39;/'/g"
+ | grep 'class="result-list__body__rank"' \
+ | sed '
+ s/.*title="\([^"]*\)".*/\1/
+ s/^.* - //
+ s/&#39;/'\'''/g
+ '
''