|
|
407d66 |
#!/bin/bash
|
|
|
407d66 |
#
|
|
|
407d66 |
# path_getActions.sh -- This function defines the command-line
|
|
|
407d66 |
# interface used to manipulate repository files.
|
|
|
407d66 |
#
|
|
|
407d66 |
# Copyright (C) 2009, 2010 Alain Reguera Delgado
|
|
|
407d66 |
#
|
|
|
407d66 |
# This program is free software; you can redistribute it and/or modify
|
|
|
407d66 |
# it under the terms of the GNU General Public License as published by
|
|
|
407d66 |
# the Free Software Foundation; either version 2 of the License, or
|
|
|
407d66 |
# (at your option) any later version.
|
|
|
407d66 |
#
|
|
|
407d66 |
# This program is distributed in the hope that it will be useful, but
|
|
|
407d66 |
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
407d66 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
407d66 |
# General Public License for more details.
|
|
|
407d66 |
#
|
|
|
407d66 |
# You should have received a copy of the GNU General Public License
|
|
|
407d66 |
# along with this program; if not, write to the Free Software
|
|
|
407d66 |
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
|
407d66 |
# USA.
|
|
|
407d66 |
#
|
|
|
407d66 |
# ----------------------------------------------------------------------
|
|
|
407d66 |
# $Id$
|
|
|
407d66 |
# ----------------------------------------------------------------------
|
|
|
407d66 |
|
|
|
407d66 |
function path_getActions {
|
|
|
407d66 |
|
|
|
407d66 |
# Define source location we are going to work with.
|
|
|
407d66 |
local SOURCE="$ACTIONVAL"
|
|
|
407d66 |
|
|
|
407d66 |
# Evaluate action name and define which actions does centos-art.sh
|
|
|
407d66 |
# script supports.
|
|
|
407d66 |
while true; do
|
|
|
407d66 |
case "$ACTIONNAM" in
|
|
|
407d66 |
|
|
|
407d66 |
'--copy' )
|
|
|
407d66 |
# Duplicate something in working copy or repository,
|
|
|
407d66 |
# remembering history.
|
|
|
407d66 |
path_doCopy
|
|
|
407d66 |
break
|
|
|
407d66 |
;;
|
|
|
407d66 |
|
|
|
407d66 |
'--move' )
|
|
|
407d66 |
# Move and/or rename something in working copy or
|
|
|
407d66 |
# repository.
|
|
|
407d66 |
# --- path_doMove
|
|
|
407d66 |
;;
|
|
|
407d66 |
|
|
|
407d66 |
'--delete' )
|
|
|
407d66 |
# Remove files and directories from version control.
|
|
|
407d66 |
# --- path_doDelete
|
|
|
407d66 |
;;
|
|
|
407d66 |
|
|
|
407d66 |
'--sync' )
|
|
|
407d66 |
# Syncronize parallel dirctories with parent directory.
|
|
|
407d66 |
# --- path_doSync
|
|
|
407d66 |
;;
|
|
|
407d66 |
|
|
|
407d66 |
* )
|
|
|
407d66 |
cli_printMessage "`gettext "The option provided is not valid."`" 'AsErrorLine'
|
|
|
407d66 |
cli_printMessage "$(caller)" 'AsToKnowMoreLine'
|
|
|
407d66 |
;;
|
|
|
407d66 |
|
|
|
407d66 |
esac
|
|
|
407d66 |
done
|
|
|
407d66 |
|
|
|
407d66 |
}
|