-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathx.sh
More file actions
executable file
Β·56 lines (47 loc) Β· 1.24 KB
/
x.sh
File metadata and controls
executable file
Β·56 lines (47 loc) Β· 1.24 KB
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
52
53
54
55
56
#!/bin/bash
echo "π§ Checking cotask installation..."
echo "-----------------------------------"
# 1) Check Rust
if ! command -v cargo &> /dev/null; then
echo "β Cargo not found. Install Rust first."
exit 1
fi
echo "β
Cargo found"
# 2) Build project
echo "π¦ Building project..."
if cargo build --release &> /dev/null; then
echo "β
Build successful"
else
echo "β Build failed"
exit 1
fi
# 3) Install binary
echo "π₯ Installing cotask..."
cargo install --path . --force &> /dev/null
echo "β
Installation complete"
# 4) Check PATH
if echo "$PATH" | grep -q "$HOME/.cargo/bin"; then
echo "β
Cargo bin directory is in PATH"
else
echo "β οΈ ~/.cargo/bin not in PATH"
echo "Add this to ~/.zshrc or ~/.bashrc:"
echo 'export PATH="$HOME/.cargo/bin:$PATH"'
fi
# 5) Verify command exists
if command -v cotask &> /dev/null; then
echo "β
cotask command found at: $(which cotask)"
else
echo "β cotask command not found"
exit 1
fi
# 6) Test run
echo "π Running test command..."
cotask --help &> /dev/null
if [ $? -eq 0 ]; then
echo "β
cotask runs successfully"
else
echo "β cotask failed to run"
exit 1
fi
echo "-----------------------------------"
echo "π Everything looks good!"