Skip to content

Commit 222e4c8

Browse files
authored
Update install.sh
1 parent 6c73e5f commit 222e4c8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

install.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
#!/bin/bash
22
set -e
33

4-
VERSION="${1:-v0.1.0}"
4+
VERSION="${1}"
5+
6+
if [ -z "$VERSION" ]; then
7+
VERSION=$(curl -s https://api.github.com/repos/dcode-tech/dcli/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
8+
fi
9+
510
OS="$(uname | tr '[:upper:]' '[:lower:]')"
611
ARCH="$(uname -m)"
712

0 commit comments

Comments
 (0)