Skip to content

Commit

Permalink
[cvs2git] Define variables to allow redefinition of some paths
Browse files Browse the repository at this point in the history
  • Loading branch information
plexoos committed Jun 11, 2020
1 parent b1e35f9 commit ba565e6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions util/cvs2git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ date

# Set default values
: ${SCRIPT_DIR:="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"}
: ${BFG:="java -jar /home/smirnovd/usr/local/bin/bfg-1.13.0.jar"}
: ${CVS_HOST:=""}
: ${CVS_DIR:="${CVS_HOST}/afs/rhic.bnl.gov/star/packages/repository"}
: ${CVS_EXCLUDED_PATHS:="${SCRIPT_DIR}/cvs2git_paths.txt"}
: ${PREFIX:="/scratch/smirnovd/star-bnl-readonly"}
: ${LOCAL_CVSROOT_DIR:="${PREFIX}/star-cvs-local"}
: ${LOCAL_GIT_DIR:="${PREFIX}/star-bnl/star-cvs"}
Expand All @@ -36,7 +38,7 @@ echo $ $cmd
$cmd

mkdir -p "${LOCAL_CVSROOT_DIR}/cvs"
cmd="rsync -a --omit-dir-times --chmod=Dug=rwx,Do=rx,Fug+rw,Fo+r --delete --delete-excluded --exclude-from=${SCRIPT_DIR}/cvs2git_paths.txt -R ${CVS_DIR}/./ ${LOCAL_CVSROOT_DIR}/cvs"
cmd="rsync -a --omit-dir-times --chmod=Dug=rwx,Do=rx,Fug+rw,Fo+r --delete --delete-excluded --exclude-from=${CVS_EXCLUDED_PATHS} -R ${CVS_DIR}/./ ${LOCAL_CVSROOT_DIR}/cvs"
echo
echo ---\> Updating local CVS modules in ${LOCAL_CVSROOT_DIR}/cvs
echo $ $cmd
Expand Down Expand Up @@ -72,7 +74,7 @@ rm -fr ${LOCAL_GIT_DIR} && mkdir -p ${LOCAL_GIT_DIR} && cd ${LOCAL_GIT_DIR}
git init
cat ${PREFIX}/git-blob.dat ${PREFIX}/git-dump.dat | git fast-import
git checkout
java -jar ${PREFIX}/bfg-1.13.0.jar --delete-folders .git --delete-files .git --no-blob-protection ./
${BFG} --delete-folders .git --delete-files .git --no-blob-protection ./
git remote add origin git@github.com:star-bnl/star-cvs.git
git push --mirror
echo -- Done
Expand Down

0 comments on commit ba565e6

Please sign in to comment.