Utility scripts for competitive programming workflows.
Provides quick setup, template management, and handy tools for contests.
You can install cp-scripts with a single command.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/ICPC-Amrita/cp-scripts/main/update-scripts)"/bin/bash -c "$(wget -qO- https://raw.githubusercontent.com/ICPC-Amrita/cp-scripts/main/update-scripts)"Run this once to make sure your local binaries are always available in the terminal:
/bin/bash -c 'os=$(uname -s); s=$(basename "$SHELL"); f=""; if [[ $s == zsh ]]; then f="$HOME/.zprofile"; elif [[ $s == bash && $os == Darwin ]]; then f="$HOME/.bash_profile"; elif [[ $s == bash ]]; then f="$HOME/.bashrc"; else f="$HOME/.profile"; fi; grep -qs ".local/bin" "$f" 2>/dev/null || echo "export PATH=\$HOME/.local/bin:\$PATH" >> "$f"'Then reload your environment:
exec "$SHELL" -lor simply restart your terminal.
- Downloads and runs the
update-scriptsinstaller. - Installs
cp-scriptsinto:$HOME/.local/share/cp-scripts(the repository)$HOME/.local/bin(symlinks for executables)
- Adds/upgrades all scripts automatically.
Once installed, just run:
update-scriptsto fetch the latest version and refresh symlinks.
Each update is tied to a Git commit hash.
The installer displays:
- Current commit hash (short + full date)
- Whether your local install is up to date with
origin/main
No. Everything is installed to $HOME/.local/ (inside your home directory).
- Git (to clone and update the repo)
- Bash (to run the installer and scripts)
- Either
curlorwget(for the one-line installer)
- Repository:
$HOME/.local/share/cp-scripts - Executables (symlinks):
$HOME/.local/bin
Make sure $HOME/.local/bin is in your PATH.
If not, run the command in the PATH setup section above.
# Update cp-scripts
update-scripts
# Run a script (example)
run A.cppPull requests and issues are welcome.
This project is maintained under ICPC-Amrita.