File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,11 @@ For Linux using custom installer:
105105curl -sSL https://bit.ly/install-xq | sudo bash
106106```
107107
108+ For Linux using custom installer, changing INSTALL_DIR, without sudo:
109+ ```
110+ curl -sSL https://bit.ly/install-xq | INSTALL_DIR=$(pwd) bash
111+ ```
112+
108113For Ubuntu 22.10 or higher via package manager:
109114```
110115apt-get install xq
Original file line number Diff line number Diff line change 33set -e
44
55URL_PREFIX=" https://github.com/sibprogrammer/xq"
6- INSTALL_DIR=/usr/local/bin/
6+ INSTALL_DIR=${INSTALL_DIR :- / usr/ local/ bin}
77BINARY=xq
88LATEST_VERSION=$( curl -L -s -H ' Accept: application/json' $URL_PREFIX /releases/latest | sed -e ' s/.*"tag_name":"v\([^"]*\)".*/\1/' )
99PLATFORM=$( uname -s | tr A-Z a-z)
@@ -28,7 +28,7 @@ ARCHIVE="${BINARY}_${LATEST_VERSION}_${PLATFORM}_${ARCH}.tar.gz"
2828URL=" $URL_PREFIX /releases/download/v${LATEST_VERSION} /$ARCHIVE "
2929
3030echo " Installation of $BINARY "
31- rm -f $INSTALL_DIR$BINARY
32- curl -sSL " $URL " | tar xz -C $INSTALL_DIR $BINARY
33- chmod +x $INSTALL_DIR$BINARY
34- echo " Successfully installed at $INSTALL_DIR$BINARY "
31+ rm -f $INSTALL_DIR / $BINARY
32+ curl -sSL " $URL " | tar xz -C $INSTALL_DIR / $BINARY
33+ chmod +x $INSTALL_DIR / $BINARY
34+ echo " Successfully installed at $INSTALL_DIR / $BINARY "
You can’t perform that action at this time.
0 commit comments