summaryrefslogtreecommitdiff
path: root/shell/bin/mv.php
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2011-11-27 11:29:44 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2011-11-27 11:29:44 -0500
commitde5cb6329b4e6a4c409d1418f16a3488a53ca953 (patch)
tree3a5af4ef0fd42e4f4904326d2cc94d53582e028e /shell/bin/mv.php
parent76ead734626996f82caddaca57dc2f84243b0947 (diff)
This is what was deployed on the lnns serverHEADmaster
Diffstat (limited to 'shell/bin/mv.php')
-rw-r--r--shell/bin/mv.php43
1 files changed, 21 insertions, 22 deletions
diff --git a/shell/bin/mv.php b/shell/bin/mv.php
index 8fc35cd..0a23048 100644
--- a/shell/bin/mv.php
+++ b/shell/bin/mv.php
@@ -1,22 +1,21 @@
-<?php
-class p_mv extends prog {
- public static main($args, $env) {
- $me = array_shift($args);
- if (count($args)>2) {
- $dest = array_pop($args);
- if (!is_dir($dest) {
- echo $me.': dest must be a directory: `'.$dest."'\n";
- return 1;
- }
- foreach ($args as $src) {
- rename($src,$dest.'/'.basename($src));
- }
- } elseif (count($args)==2) {
- rename($args[0],$args[1]);
- } else {
- echo 'Usage: '.$me." SOURCE [SOURCE2 [SOURCE3 ...]] DEST\n";
- return 1;
- }
- }
-}
-
+<?php
+class p_mv extends prog {
+ public static function main($args, $env) {
+ $me = array_shift($args);
+ if (count($args)>2) {
+ $dest = array_pop($args);
+ if (!is_dir($dest)) {
+ echo $me.': dest must be a directory: `'.$dest."'\n";
+ return 1;
+ }
+ foreach ($args as $src) {
+ rename($src,$dest.'/'.basename($src));
+ }
+ } elseif (count($args)==2) {
+ rename($args[0],$args[1]);
+ } else {
+ echo 'Usage: '.$me." SOURCE [SOURCE2 [SOURCE3 ...]] DEST\n";
+ return 1;
+ }
+ }
+}