# cpynet installer - fetches the cpy/pst shell functions from https://cpynet.com/alias, # adds a source line to your shell's rc file (once, never duplicated), and # loads them into this session right now. # # Dot-sourced (". install.sh"), not run as a subprocess - that's what makes # cpy/pst usable immediately in this terminal, not just in new ones. CPYNET_RC=~/.bashrc [ -n "$ZSH_VERSION" ] && CPYNET_RC=~/.zshrc if curl -s https://cpynet.com/alias -o ~/.cpy.sh && bash -n ~/.cpy.sh; then grep -qxF 'source ~/.cpy.sh' "$CPYNET_RC" || echo 'source ~/.cpy.sh' >> "$CPYNET_RC" . ~/.cpy.sh echo "cpynet installed - cpy and pst are ready" else echo "install failed, try again" fi unset CPYNET_RC