Last active
August 29, 2015 13:57
-
-
Save vst/9520867 to your computer and use it in GitHub Desktop.
Creates a folder named `CRAN` in the same folder as this script and mirrors/syncs master CRAN repository to the `CRAN` folder.
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 | |
## **Description:** Creates a folder named `CRAN` in the same folder | |
## as this script and mirrors/syncs master CRAN repository to the | |
## `CRAN` folder. | |
# Get the script path: | |
SCRIPTPATH=$( cd $(dirname $0) ; pwd -P ) | |
# Get the mirror path: | |
MIRRORDIR="/CRAN" | |
MIRRORPATH=${SCRIPTPATH}${MIRRORDIR} | |
# Notify: | |
echo "Using '${MIRRORPATH}' as destination to mirror the CRAN" | |
# Mirror/Sync: | |
rsync -rtlzv --delete cran.r-project.org::CRAN "${MIRRORPATH}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment