add module copy module_cp to module library

master
Kebler Network System Administrator 2022-10-24 18:12:33 -07:00
parent 9d7e07a113
commit 10fb48069b
1 changed files with 10 additions and 0 deletions

View File

@ -96,6 +96,16 @@ cat $FILE
return 0
}
module_cp() {
[ ! $1 ] && echo "no module specified" && return 1
local FILE
FILE=$(module_find $1)
[ $? -ne 0 ] && echo no module $1 found && return 1
echo cp $FILE ${2:-$(pwd)}
cp $FILE ${2:-$(pwd)}
return 0
}
module_loaded() {
[ ! $1 ] && echo "no module specified" && return 1
local func