Skip to content

Commit 927cfcb

Browse files
committed
Add iko directory
1 parent ebbb4b6 commit 927cfcb

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

iko/install.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/sh
2+
3+
set -euo pipefail
4+
5+
INSTALL_DIR="$HOME/.local/bin"
6+
WRAPPER="$INSTALL_DIR/iko"
7+
8+
mkdir -p "$INSTALL_DIR"
9+
10+
cat > "$WRAPPER" <<'EOF'
11+
#!/bin/sh
12+
docker run --rm -it -v "${PWD}/migrations:/repo:rw" -v "${PWD}/scripts:/scripts:ro" ghcr.io/explodinglabs/iko:0.1.0 "$@"
13+
EOF
14+
15+
chmod +x "$WRAPPER"
16+
17+
if ! echo "$PATH" | grep -q "$INSTALL_DIR"; then
18+
echo "✅ Installed iko to $WRAPPER"
19+
echo "⚠️ Warning: $INSTALL_DIR is not in your PATH. Add this to your shell profile:"
20+
echo 'export PATH="$HOME/.local/bin:$PATH"'
21+
else
22+
echo "✅ Installed iko. You can now run: iko"
23+
fi

0 commit comments

Comments
 (0)