]>
src.bluestatic.org Git - viewsvn.git/blob - includes/shellcmd.php
2 /*=====================================================================*\
3 || ###################################################################
4 || # ViewSVN [#]version[#]
5 || # Copyright ©2002-[#]year[#] Iris Studios, Inc.
7 || # This program is free software; you can redistribute it and/or modify
8 || # it under the terms of the GNU General Public License as published by
9 || # the Free Software Foundation; version [#]gpl[#] of the License.
11 || # This program is distributed in the hope that it will be useful, but
12 || # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 || # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 || # You should have received a copy of the GNU General Public License along
17 || # with this program; if not, write to the Free Software Foundation, Inc.,
18 || # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 || ###################################################################
20 \*=====================================================================*/
23 * Class that interacts with the command line system
29 * Interacts with the command line via escapes and executions
37 * Wrapper for escapeshellarg()
41 * @param string The argument
43 * @return string Cleaned argument
45 function arg($argument)
47 return escapeshellarg($argument);
51 * Wrapper for escapeshellcmd
55 * @param string Command
57 * @return string Cleaned command
59 function cmd($command)
61 return escapeshellcmd($command);
65 * Executes a shell command and returns all the output
70 * @param string UNIX command
72 * @return array Output
74 function exec($command)
77 $viewsvn->debug("exec(): $command");
79 exec($command, $output);
84 /*=====================================================================*\
85 || ###################################################################
88 || ###################################################################
89 \*=====================================================================*/