This commit is contained in:
Marc Beninca 2024-06-08 12:35:51 +02:00
parent 1100cf4234
commit 571497c5cf
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

10
cd.sh
View file

@ -678,17 +678,16 @@ cd_openssl () {
}
cd_rm () {
local path="${1}"
if [ -e "${path}" ] ; then
echo "${path}"
rm -r "${path}" || exit
cd_rm__path="${1}"
if [ -e "${cd_rm__path}" ] ; then
echo "${cd_rm__path}"
rm -r "${cd_rm__path}" || exit
fi
}
cd_sed () {
cd_sed__file="${1}"
shift
#
if [ -f "${cd_sed__file}" ] ; then
cd_cat "${cd_sed__file}"
for cd_sed__regex in "${@}" ; do
@ -718,7 +717,6 @@ ${CD___UP}"
cd_write () {
cd_write__file="${1}"
cd_write__text="${2}"
#
if [ "${cd_write__file}" ] ; then
[ -f "${cd_write__file}" ] && cd_cat "${cd_write__file}"
echo "${cd_write__file}"