Git-Url:
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=76d6be4f873cbf32838e62354d655aeea9e00f6d
commit 76d6be4f873cbf32838e62354d655aeea9e00f6d
Author: Michel Hermier <[EMAIL PROTECTED]>
Date: Mon Mar 24 22:21:35 2008 +0100
util.sh
* Fixed some command behaviour so that they are more logical.
* All the deprecated functions display a warning at build time, maintainers
review your scripts when updating/bumping version.
diff --git a/source/include/util.sh b/source/include/util.sh
index 49344f8..145953a 100644
--- a/source/include/util.sh
+++ b/source/include/util.sh
@@ -154,12 +154,18 @@ Frm() {
}
###
-# * Fcp(): Copy file(s) under $Fdestdir. First parameter: name of the file,
-# second parameter: path of the destination.
+# * Fcp(): Copy file(s) to $Fdestdir recursively from $Fsrcdir. First
+# parameter: name of the file, second parameter: path of the destination.
###
Fcp() {
Fmessage "Copying file(s): $1"
- cp "$Fdestdir/"$1 "$Fdestdir"/$2 || Fdie
+ if [ -e "$Fdestdir/"$1 ]; then
+ # Compatibility
+ warning "Deprecated usage of $*"
+ cp "$Fdestdir/"$1 "$Fdestdir"/$2 || Fdie
+ else
+ cp -a "$Fsrcdir/"$1 "$Fdestdir"/$2 || Fdie
+ fi
}
###
@@ -168,16 +174,28 @@ Fcp() {
###
Fcpr() {
Fmessage "Copying file(s) recursive: $1"
+ warning "Fcpr is deprecated in favor of Fcp"
cp -a "$Fsrcdir/"$1 "$Fdestdir"/$2 || Fdie
}
###
+# * Fcprel(): Copy file(s) to $Fdestdir recursively from the current working
+# directory. First parameter: name of the file, second parameter: path of the
+# destination.
+###
+Fcprel() {
+ Fmessage "Copying file(s): $1"
+ cp -a $1 "$Fdestdir"/$2 || Fdie
+}
+
+###
# * Fcprrel(): Copy file(s) to $Fdestdir recursively from the current working
# directory. First parameter: name of the file, second parameter: path of the
# destination.
###
Fcprrel() {
Fmessage "Copying file(s) recursive: $1"
+ warning "Fcprrel is deprecated in favor of Fcprel"
cp -a $1 "$Fdestdir"/$2 || Fdie
}
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git