Commit 3a418bcd authored by Cyril Matthey-Doret's avatar Cyril Matthey-Doret
Browse files

udpate script paths in readme

parent aad6e6a1
Pipeline #327044 passed with stage
in 12 seconds
......@@ -64,7 +64,6 @@ usage:
```sh
python collect_forks.py \
--token token.asc \
--deadline "YYYY-MM-DDThh-mm-ss" \
https://gitlab-instance.com/namespace/upstream-project \
> forks.json
......@@ -74,9 +73,9 @@ python collect_forks.py \
In some cases, the student projects may have to be cloned locally by the teacher. We provide a shell script to automate this process. This script will read the JSON output from `collect_forks.py` and clone all the forks at the deadline commit into a target directory.
script: [scripts/clone_forks.sh](scripts/clone_forks.sh)
script: [scripts/clone_forks_from_json.sh](scripts/clone_forks_from_json.sh)
usage: `python clone_forks.sh forks.json clone_dir`
usage: `python clone_forks_from_json.sh forks.json clone_dir`
### Sending feedback
......
......@@ -9,8 +9,8 @@
function usage () {
cat <<EOF
Usage:
$(basename $0) [outdir] [in_file.json]
./collect_forks.py --token token.asc URL | $(basename $0) [outdir]
./$(basename $0) [outdir] [in_file.json]
./collect_forks.py --token token.asc URL | ./$(basename $0) [outdir]
Reads json output from collect_forks.py and clone all target forks into provided directory
at the target commit. Repositories are cloned into outdir/namespace.
......@@ -29,8 +29,8 @@ if [[ $# -gt 2 ]] || [[ $1 == '-h' ]] || [[ $1 == '--help' ]]; then
usage
fi
mkdir -p ${OUT_DIR}
mkdir -p "${OUT_DIR}"
jq ".[] | \"git clone \(.url) $OUT_DIR/\(.group) && cd ${OUT_DIR}/\(.group) && git checkout \(.commit)\"" \
< ${JSON} \
< "${JSON}" \
| xargs -L 1 -I {} sh -c "{}"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment