-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
51 lines (41 loc) · 1.33 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/sh
set -e
if [ "$(whoami)" != "perforce" ]; then
echo "This script must be run by the 'perforce' user."
exit 1
fi
if ! command -v p4 >/dev/null; then
echo "Perforce p4 cli is not installed. Please install it and try again."
exit 1
fi
if ! p4 -s info >/dev/null 2>&1; then
echo "No Perforce connection detected. Check your Perforce configuration before installing runtrigger."
exit 1
fi
if ! command -v git >/dev/null; then
echo "git is not installed. Please install it and try again."
exit 1
fi
if ! command -v curl >/dev/null; then
echo "curl is not installed. Please install it and try again."
exit 1
fi
source $HOME/.bashrc
if ! command -v deno >/dev/null; then
echo "Installing Deno..."
curl -fsSL https://deno.land/install.sh | sh
echo "Configuring Deno..."
echo "export DENO_INSTALL=\"$HOME/.deno\"" >> $HOME/.bashrc
echo "export PATH=\"\$DENO_INSTALL/bin:\$PATH\"" >> $HOME/.bashrc
source $HOME/.bashrc
deno --version
fi
echo "Installing runtrigger from source..."
mkdir -p $HOME/runtrigger
cd $HOME/runtrigger
git clone https://github.com/runreal/runtrigger .
deno install --global --name runtrigger --force -A src/index.ts
runtrigger --version
echo "Installation complete."
echo "Run source $HOME/.bashrc to make the runtrigger command available in your shell."
echo "Run runtrigger --help to see the available commands."