Last active
July 28, 2020 18:45
-
-
Save ninp0/2478ff7bbce0036a11f729d715923f28 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash --login | |
target_repo="${1}" | |
uri_source_root="${2}" | |
usage() { | |
echo "USAGE: ${0} <target_repo_path> <repo_uri_root_source>" | |
echo "EXAMPLE: cd /tmp && git clone https://github.com/python/cpython && cd cpython && ${0} /tmp/cpython 'https://github.com/python/cpython/tree/master'" | |
exit 1 | |
} | |
if [[ $# != 2 ]]; then | |
usage | |
fi | |
if [[ -d $target_repo ]]; then | |
docker run \ | |
--name csi_scapm.$RANDOM \ | |
--publish 127.0.0.1:3333:3333 \ | |
--volume /tmp:/tmp \ | |
--rm \ | |
--interactive \ | |
--tty 0dayinc/csi_scapm \ | |
--login \ | |
-c "csi_scapm --dir-path ${target_repo} --uri-source-root '${uri_source_root}' --max-threads 39 --start-reporting-server" | |
else | |
echo "${target_repo} Doesn't Exist!" | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment