-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathzmanimcli
More file actions
executable file
·38 lines (28 loc) · 901 Bytes
/
zmanimcli
File metadata and controls
executable file
·38 lines (28 loc) · 901 Bytes
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
#! /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=`whereis ZmanimCLI.jar | cut -d ' ' -f2`
if [ "$ZmanimCLIPATH" = "" ]
then
echo "ZmanimCLI.jar not found! Are you sure you have ZmanimCLI installed?"
exit
fi
#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'