I am pulling from Github to our webserver for our site. All actions are done via bash scripts and scalr. In our website, one of the folders is a NFS mount to a S3 folder. Is there a way I can do a pull without killing that folder and having to remount it? This is my current script:
## Git Clone -------------------------------------------------------------------
if [ -d "$DEPLOY_PATH"/.git ]; then
cd "$DEPLOY_PATH"
if $GIT_PATH status >/dev/null 2>&1; then
$GIT_PATH pull
exit 0
fi
fi
$GIT_PATH clone $GIT_REPO_URL $GIT_CL_DIR .
## Git Checkout ----------------------------------------------------------------
# There should be *no* changes to the pristine repo.
echo "Ensure pristine copy. Executing 'git reset --hard'."
$GIT_PATH reset --hard HEAD 2>/dev/null
echo "Pulling updates from $GIT_REMOTE"
$GIT_PATH fetch $GIT_REMOTE
current_branch=$($GIT_PATH branch | awk '/\* /{print $2}')
if [[ "$current_branch" = "$GIT_BRANCH" ]] then
echo "Already on branch '$GIT_BRANCH'."
elif ! $GIT_PATH branch | awk "/$GIT_BRANCH$/" >/dev/null 2>&1 then
echo "Checkout of branch '$GIT_BRANCH'"
$GIT_PATH checkout -b $GIT_BRANCH --track $GIT_REMOTE/$GIT_BRANCH 2>/dev/null
elif ! $GIT_PATH checkout $GIT_BRANCH 2>/dev/null then
echo "Branch '$GIT_REMOTE/$GIT_BRANCH' not found. Skipping remainder of update." 1>&2
exit 1
fi
# Run our git commands
$GIT_PATH pull
## Get submodules, if exist.
if [ -e ".gitmodules" ]
then
echo "Updating submodules."
$GIT_PATH submodule init 2>/dev/null
$GIT_PATH submodule update
fi
Then I do the mounting of folders and such....