-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathzmanimcli
More file actions
executable file
·50 lines (37 loc) · 1.06 KB
/
Copy pathzmanimcli
File metadata and controls
executable file
·50 lines (37 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#! /bin/bash
# ZmanimCLI.sh - Moshe Wagner, 5770 <moshe.waner@gmail.com>
# As far as I'm concerned, this could count as Public Domain.
# Small bash script invoking ZmanimCLI.jar .
#This script should be in your path, and ZmanimCLI.jar must be installed in your system
#Try to locate java
java=`which java`
#Shout if java isn't present
if [ "$java" = "" ]
then
echo "'Java' command not found! Are you sure you have Java installed?"
exit
fi
#Try to locate ZmanimCLI.jar
ZmanimCLIPATH=`ls ZmanimCLI.jar`
if [ "$ZmanimCLIPATH" = "" ]
then
ZmanimCLIPATH=`ls /usr/share/java/ZmanimCLI.jar`
fi
if [ "$ZmanimCLIPATH" = "" ]
then
ZmanimCLIPATH=`whereis ZmanimCLI.jar | cut -d ' ' -f2`
fi
if [ "$ZmanimCLIPATH" = "" ]
then
echo "ZmanimCLI.jar not found! Are you sure you have ZmanimCLI installed?"
exit
fi
echo $ZmanimCLIPATH
#Make sure sed is installed
sed=`which sed`
if [ "$sed" = "" ]
then
echo "No sed installed?! If not on a unix system, please use 'ZmanimCLI.jar' directly."
exit
fi
$java -jar $ZmanimCLIPATH $@ | $sed 's/ZmanimCLI/zmanimcli/g'