Commit 80796de git
committed
1 parent 260de19 commit 80796de Copy full SHA for 80796de
File tree 1 file changed +17
-16
lines changed
1 file changed +17
-16
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash -e
2
2
3
- UNAME=$( command -v uname)
3
+ UNAME=$( command -v uname)
4
+ file=$1
5
+
6
+ function nix {
7
+ sed -i ' s/.*$to_real.*//g' $file
8
+ sed -i ' s/.*$remainder_t.*//g' $file
9
+ sed -i ' s/.*$quotient_e.*//g' $file
10
+ }
11
+
12
+ # Prepending the string expression with an empty string: '' lets it work on
13
+ # macOS by mitigating unknown label errors
14
+ function mac {
15
+ sed -i ' ' ' s/.*$to_real.*//g' $file
16
+ sed -i ' ' ' s/.*$remainder_t.*//g' $file
17
+ sed -i ' ' ' s/.*$quotient_e.*//g' $file
18
+ }
4
19
5
20
case $( " ${UNAME} " | tr ' [:upper:]' ' [:lower:]' ) in
6
21
linux* )
@@ -17,20 +32,6 @@ case $( "${UNAME}" | tr '[:upper:]' '[:lower:]') in
17
32
nix
18
33
;;
19
34
* )
20
- printf ' unknown o/s\n'
35
+ printf ' unsupported o/s\n'
21
36
;;
22
37
esac
23
-
24
- nix () {
25
- sed -i ' s/.*$to_real.*//g' $1
26
- sed -i ' s/.*$remainder_t.*//g' $1
27
- sed -i ' s/.*$quotient_e.*//g' $1
28
- }
29
-
30
- mac () {
31
- # Prepending the string expression with an empty string: '' lets it work on
32
- # macOS by mitigating unknown label errors
33
- sed -i ' ' ' s/.*$to_real.*//g' $1
34
- sed -i ' ' ' s/.*$remainder_t.*//g' $1
35
- sed -i ' ' ' s/.*$quotient_e.*//g' $1
36
- }
You can’t perform that action at this time.
0 commit comments