mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-11-25 22:27:34 +00:00
removed create_tomb, left deprecation notice
This commit is contained in:
parent
181f0fc636
commit
943a46ef60
33
tomb
33
tomb
@ -1597,36 +1597,6 @@ change_tomb_key() {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# backward compatibility
|
|
||||||
# TODO DEPRECATED remove in 2.0
|
|
||||||
create_tomb() {
|
|
||||||
_verbose "create_tomb(): ::1:: ::2::" ${=@} ${=OLDARGS}
|
|
||||||
[[ "$1" = "" ]] && {
|
|
||||||
_warning "No tomb name specified for creation."
|
|
||||||
return 1 }
|
|
||||||
|
|
||||||
{ test -s "$1" } && {
|
|
||||||
_warning "Creating this tomb would overwrite an existing file."
|
|
||||||
ls -lh "$1"
|
|
||||||
_failure " Operation aborted." }
|
|
||||||
|
|
||||||
tombfile=`basename $1`
|
|
||||||
tombdir=`dirname $1`
|
|
||||||
# make sure the file has a .tomb extension
|
|
||||||
tombname=${tombfile%%\.*}
|
|
||||||
tombfile=${tombname}.tomb
|
|
||||||
|
|
||||||
${TOMBEXEC} dig ${=PARAM}
|
|
||||||
${TOMBEXEC} forge ${tombdir}/${tombfile}.key
|
|
||||||
{ test $? = 0 } || { _failure "Failed to forge key, operation aborted." }
|
|
||||||
|
|
||||||
${TOMBEXEC} lock ${tombdir}/${tombfile} -k ${tombdir}/${tombfile}.key
|
|
||||||
{ test $? = 0 } || { _failure "Failed to lock tomb with key, operation aborted." }
|
|
||||||
|
|
||||||
_success "Tomb ::1 tomb name:: succesfully created." $tombname
|
|
||||||
ls -l ${tombfile}*
|
|
||||||
}
|
|
||||||
|
|
||||||
# }}} - Creation
|
# }}} - Creation
|
||||||
|
|
||||||
# {{{ Open
|
# {{{ Open
|
||||||
@ -2561,8 +2531,7 @@ main() {
|
|||||||
usage
|
usage
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# DEPRECATED!
|
# DEPRECATION notice (leave here as 'create' is still present in old docs)
|
||||||
# TODO: remove in 2.0
|
|
||||||
create)
|
create)
|
||||||
_warning "The create command is deprecated, please use dig, forge and lock instead."
|
_warning "The create command is deprecated, please use dig, forge and lock instead."
|
||||||
_warning "For more informations see Tomb's manual page (man tomb)."
|
_warning "For more informations see Tomb's manual page (man tomb)."
|
||||||
|
Loading…
Reference in New Issue
Block a user