Skip to content

Commit f0ca415

Browse files
author
Arjun Balaji
committed
mimic official installation and use gnu
1 parent b1bdfee commit f0ca415

1 file changed

Lines changed: 17 additions & 4 deletions

File tree

terminal-bench-test/setup_amazon_q.sh

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,28 @@ AWS_ACCESS_KEY_ID="$QCHAT_ACCESSKEY" AWS_SECRET_ACCESS_KEY="$Q_SECRET_ACCESS_KEY
4545
echo "Extracting qchat.zip..."
4646
unzip -q qchat.zip
4747

48-
# move it to /usr/local/bin/qchat for path as qchat may not work otherwise
49-
if cp qchat /usr/local/bin/ && chmod +x /usr/local/bin/qchat; then
48+
# Debug: Show extracted structure
49+
echo "Extracted contents:"
50+
ls -la
51+
52+
# Extract and install mimicing the official release
53+
if [ -d "q" ] && [ -f "q/bin/qchat" ]; then
54+
cp q/bin/qchat /usr/local/bin/qchat
55+
cp q/bin/q /usr/local/bin/q 2>/dev/null || ln -sf /usr/local/bin/qchat /usr/local/bin/q
56+
chmod +x /usr/local/bin/qchat /usr/local/bin/q
57+
echo "qchat installed successfully"
58+
elif [ -f "qchat" ]; then
59+
# Fallback if it's just the binary
60+
cp qchat /usr/local/bin/qchat
5061
ln -sf /usr/local/bin/qchat /usr/local/bin/q
62+
chmod +x /usr/local/bin/qchat
5163
echo "qchat installed successfully"
5264
else
53-
echo "ERROR: Failed to install qchat"
65+
echo "ERROR: qchat not found in expected locations"
66+
ls -la
5467
exit 1
5568
fi
5669

5770
echo "Cleaning q zip"
5871
rm -f qchat.zip
59-
rm -rf qchat
72+
rm -rf q qchat

0 commit comments

Comments
 (0)