|
| 1 | +# Replication |
| 2 | + |
| 3 | +The script `create-forks-on-github.sh` can be used to create forks of all the |
| 4 | +repositories in the `../../../DiffDetectiveMining/` folder. It marks them as a |
| 5 | +fork and replicates the local state in this fork. The indended use case is to |
| 6 | +provide immutable copies of all source data to make all results of this research |
| 7 | +reproducible. |
| 8 | + |
| 9 | +## Usage |
| 10 | +First run: |
| 11 | +```bash |
| 12 | +./create-forks-on-github.sh |
| 13 | +``` |
| 14 | + |
| 15 | +It will ask some verification questions and prints all commands that it will |
| 16 | +perform. If the source repositories are not located in |
| 17 | +`../../../DiffDetectiveMining/` (relative to this file) or |
| 18 | +`../DiffDetectiveMining` (relative to the root directory of this repository) the |
| 19 | +comment character of the variable `PATH_TO_REPOSITORIES` in the second paragraph |
| 20 | +can be removed and the actual path can be set. |
| 21 | + |
| 22 | +To execute the printed commands uncomment the last line of the second paragraph |
| 23 | +which disables `DRY_RUN`. |
| 24 | + |
| 25 | +## Login |
| 26 | +You can either login beforehand with `gh auth login` or just run the script |
| 27 | +which will run this command for you. This script will *not* log you out once |
| 28 | +it's finished because you may want to run additional commands (or you where |
| 29 | +previously logged in). |
| 30 | + |
| 31 | +## Additional notes |
| 32 | +This script should be idempotent as `gh` detects an already forked project and |
| 33 | +the performed force push should not change anything (unless the remote |
| 34 | +repository was changed). |
| 35 | + |
| 36 | +## Requirements |
| 37 | +This script requires a standard UNIX environment with at least the following |
| 38 | +additional tools: |
| 39 | +- `bash`, the GNU POSIX shell |
| 40 | +- `gh`, the github command line interface |
| 41 | +- GNU `find`, the POSIX `find` with some additional options (mainly `-print0`, |
| 42 | + but this was not tested with other `find` implementations) |
| 43 | + |
| 44 | +This script was tested under GNU+Linux. |
0 commit comments