@@ -3,28 +3,13 @@ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
3
3
SRC_DIR=" $( dirname $DIR ) "
4
4
5
5
# Set install path
6
- INSTALL_DIR=" $HOME /.local /bin"
6
+ INSTALL_DIR=" $SRC_DIR /bin"
7
7
mkdir -p " $INSTALL_DIR "
8
8
9
- # Check if envsubst.old exists
10
- if [[ ! -f " /usr/bin/envsubst.old" ]]; then
11
- echo " envsubst.old does not exist. Proceeding with installation..."
12
-
13
- ENVSUBST_VERSION=" v1.4.3"
14
- URL=" https://github.com/a8m/envsubst/releases/download/$ENVSUBST_VERSION /envsubst-$( uname -s) -$( uname -m) "
15
- echo " Downloading: $URL "
16
-
17
- curl -sL $URL -o $INSTALL_DIR /envsubst
18
- chmod +x " $INSTALL_DIR /envsubst"
19
-
20
- # Replace existing envsubst if present
21
- if [[ -f " /usr/bin/envsubst" ]]; then
22
- sudo mv /usr/bin/envsubst /usr/bin/envsubst.old
23
- sudo ln -s " $INSTALL_DIR /envsubst" /usr/bin/envsubst
24
- echo " Replaced existing envsubst with the new one at /usr/bin/envsubst"
25
- else
26
- touch /usr/bin/envsubst.old
27
- fi
9
+ if [[ ! -f " $INSTALL_DIR /envsubst" ]]; then
10
+ echo " Installing github.com/a8m/envsubst into bin"
11
+ make -C " $SRC_DIR /hack/tools" bin/envsubst
12
+ ln -s " $SRC_DIR /hack/tools/bin/envsubst" " $INSTALL_DIR /envsubst"
28
13
29
14
# Verify installation
30
15
if ! command -v envsubst & > /dev/null; then
@@ -34,8 +19,7 @@ if [[ ! -f "/usr/bin/envsubst.old" ]]; then
34
19
fi
35
20
36
21
# Use build location by default
37
- if [[ ! -e " $INSTALL_DIR /clusterawsadm" ]]; then
38
- echo " Linking [$SRC_DIR /bin/clusterawsadm] [$INSTALL_DIR /clusterawsadm]"
39
- mkdir -p " $INSTALL_DIR "
40
- ln -s " $SRC_DIR /bin/clusterawsadm" $INSTALL_DIR /clusterawsadm
22
+ if [[ ! -f " $INSTALL_DIR /clusterawsadm" ]]; then
23
+ echo " Installing clusterawsadm into bin"
24
+ make -C " $SRC_DIR " clusterawsadm
41
25
fi
0 commit comments