#!/bin/bash
find $1 -type d -name CVS -exec rm -rf {} \; 2> /dev/null
find $1 -type d -name .svn -exec rm -rf {} \; 2> /dev/null
+find $1 -type d -name .git -exec rm -rf {} \; 2> /dev/null
find $1 -type d -name OPEN_ILS_STAFF_CLIENT -exec rm -rf {} \; 2> /dev/null
exit 0
For the time being, we are still installing everything in the `/openils/`
directory. If you are working with a version of Evergreen taken directly
-from the Subversion repository, rather than a packaged version of Evergreen,
+from the Git repository, rather than a packaged version of Evergreen,
first see `Developer instructions` below.
Otherwise, issue the following commands to configure and build Evergreen:
Developer instructions:
-----------------------
-Developers working directly with the source code from the Subversion
+Developers working directly with the source code from the Git
repository will also need to install some extra packages and perform
one more step before they can proceed with the `./configure` step.
#
# Based on initial version by Bill Erickson.
-function svn_or_git {
+function fetch_changes {
echo -en "###########\nUpdating source directory:" `pwd` "\n";
if [ -d "./.git" ]; then
- if [ -d "./.git/svn/trunk" ]; then
- git svn fetch;
- # git svn rebase origin || die_msg "git svn rebase origin failed";
- else
- git fetch;
- # git rebase origin || die_msg "git rebase origin failed";
- fi
+ git fetch;
+ # git rebase origin || die_msg "git rebase origin failed";
else
- echo "Remember to run svn update as needed";
- # svn update || die_msg "svn update failed";
+ echo "You don't appear to be using Git yet, please fix that"
+ exit 1;
fi
}
Considerations:
* Run as opensrf user
* opensrf needs sudo
- * Assumes opensrf has OpenILS and OpenSRF repositories as svn or git-svn
+ * Assumes opensrf has OpenILS and OpenSRF repositories as Git
checkouts and both have been configured (as in ./configure)
END_OF_USAGE
[ ! -d "$OSRF" ] && die_msg "OpenSRF Source Directory '$OSRF' does not exist!";
which sudo >/dev/null || die_msg "sudo not installed (or in PATH)";
-[ -d "${ILS}/.svn" ] || [ -d "${ILS}/.git" ] || [ -d ${ILS}/.bzr ] || die_msg "Evergreen Source Directory '$ILS' is not a SVN, bzr or git repo";
+[ -d "${ILS}/.git" ] || [ -d ${ILS}/.bzr ] || die_msg "Evergreen Source Directory '$ILS' is not a SVN, bzr or git repo";
if [ ! -z "$OPT_TEST" ] ; then
feedback;
# OpenSRF perl directory is not shared. update the drone
# ssh 10.5.0.202 "./update_osrf_perl.sh";
-cd $OSRF; svn_or_git;
-cd $ILS; svn_or_git;
+cd $OSRF; fetch_changes;
+cd $ILS; fetch_changes;
if [ -n "$OPT_CLEAN" ]; then
cd $OSRF && make clean;
+++ /dev/null
-#!/bin/bash
-#
-# Author: Joe Atzberger
-#
-# This script will update your git-svn repository from the
-# SVN source repo and push to a github remote (if one exists).
-#
-# The design is (somewhat) suitable for cronjob because it:
-# ~ only updates the local "master" branch
-# ~ dies if it cannot switch to "master"
-# ~ switches back to whatever branch was current initially
-#
-# However, it will fail if you cannot switch branches, (i.e.
-# have a lot of uncommited changes).
-#
-# WARNING: you should NOT run this in crontab on a repo you
-# are actively developing since switching branches (even
-# momentarily) in the middle of editing or runtime could
-# seriously confuse any developer. Instead, just run it
-# manually as needed.
-#
-# Workflow might look like:
-# git checkout -b my_feature
-# [ edit, edit, edit ]
-# git commit -a
-# ./build/tools/update_git_svn.sh
-# git rebase master
-# git push github my_feature
-#
-
-function die_msg {
- echo "ERROR at $1" >&2;
- exit;
-}
-function parse_git_branch {
- ref=$(git-symbolic-ref HEAD 2> /dev/null) || return;
- ref=${ref#refs/heads/};
- # echo "REF2: $ref";
-}
-
-
-parse_git_branch;
-BRANCH=$ref;
-
-echo "Current branch: $BRANCH";
-
-git svn fetch || die_msg 'git svn fetch';
-# git status || die_msg 'git status';
-git checkout master || die_msg 'git checkout master';
-
-MESSAGE='';
-git svn rebase || MESSAGE="ERROR at git svn rebase; ";
-git checkout $BRANCH || die_msg "${MESSAGE}git checkout $BRANCH";
-git push github master;
-