File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88INSTALL_DIR=" /usr/local/bin"
99NO_RELEASE_ASSET=" "
1010
11+ # Calculate checksum. We use this function because Linux and macOS have different commands
12+ calculate_checksum () {
13+ if [ " $OS_NAME " = " Darwin" ]; then
14+ # macOS
15+ shasum -a 256 " $1 " | cut -d ' ' -f 1
16+ else
17+ # Linux and others
18+ sha256sum " $1 " | cut -d ' ' -f 1
19+ fi
20+ }
21+
1122echo " Installing envfetch to $INSTALL_DIR "
1223echo " This script will activate sudo to install to $INSTALL_DIR "
1324sudo echo " Sudo activated"
6374sudo chmod +x " $INSTALL_DIR /envfetch"
6475
6576echo " Successfully installed envfetch"
66-
67- # Calculate checksum. We use this function because Linux and macOS have different commands
68- calculate_checksum () {
69- if [ " $OS_NAME " = " Darwin" ]; then
70- # macOS
71- shasum -a 256 " $1 " | cut -d ' ' -f 1
72- else
73- # Linux and others
74- sha256sum " $1 " | cut -d ' ' -f 1
75- fi
76- }
You can’t perform that action at this time.
0 commit comments