File tree 1 file changed +2
-14
lines changed
1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change 21
21
: ${USE_SUDO:= " true" }
22
22
: ${DEBUG:= " false" }
23
23
: ${INSTALL_DIR:= " /usr/local/bin" }
24
+ : ${TAG:= " latest" }
24
25
25
26
HAS_ORAS=" $( type " oras" & > /dev/null && echo true || echo false) "
26
27
@@ -75,21 +76,8 @@ verifySupported() {
75
76
fi
76
77
}
77
78
78
- downloadFile () {
79
- DIST=" oras_${TAG} _${OS} _${ARCH} .tar.gz"
80
- DOWNLOAD_URL=" https://github.com/oras-project/oras/releases/download/v$TAG /$DIST "
81
- TMP_ROOT=" $( mktemp -dt oras-XXXXXX) "
82
- TMP_FILE=" $TMP_ROOT /$DIST "
83
- echo " Downloading $DOWNLOAD_URL "
84
- if [ " ${HAS_CURL} " == " true" ]; then
85
- curl -SsL " $DOWNLOAD_URL " -o " $TMP_FILE "
86
- elif [ " ${HAS_WGET} " == " true" ]; then
87
- wget -q -O " $TMP_FILE " " $DOWNLOAD_URL "
88
- fi
89
- }
90
-
91
79
installFile () {
92
- runAsRoot oras pull -o /usr/local/bin/ ghcr.io/githedgehog/fabricator/hhfab:latest
80
+ runAsRoot oras pull -o /usr/local/bin/ ghcr.io/githedgehog/fabricator/hhfab:" ${TAG} "
93
81
runAsRoot chmod +x /usr/local/bin/hhfab
94
82
95
83
echo " $BINARY_NAME installed into $INSTALL_DIR /$BINARY_NAME "
You can’t perform that action at this time.
0 commit comments