Browse Source

implement makeNode()

master
belliash 8 years ago
parent
commit
c2244847aa
1 changed files with 15 additions and 0 deletions
  1. +15
    -0
      libraries/filesystem

+ 15
- 0
libraries/filesystem View File

@@ -89,6 +89,21 @@ function makeLink() {
return ${RESULT}
}

#-------------------------------------------------------------------------------
# Makes block or character special file (wrapper to mknod)
# Parameters: %directory% %name% %type% [%major%] [%minor%]
#-------------------------------------------------------------------------------
function makeNode() {
local DIRECTORY="${1}"
shift
if [ ! -d ${DIRECTORY} ]; then
makeDirectory ${DIRECTORY} || return 1
fi
cd ${DIRECTORY}
run "mknod ${*}" || return 1
return 0
}

#-------------------------------------------------------------------------------
# Extracts any tar based archive into specified directory
# Parameters: %tarball% %dest_directory%


Loading…
Cancel
Save