ash: expr -e support
This commit is contained in:
@@ -279,6 +279,9 @@ expr_operator(op, sp, fs)
|
||||
sp->u.num = expr_is_false(sp);
|
||||
sp->type = BOOLEAN;
|
||||
break;
|
||||
case EXISTS:
|
||||
if (fs->rcode >= 0) goto true;
|
||||
goto false;
|
||||
case ISREAD:
|
||||
i = 04;
|
||||
goto permission;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
# by the Ash General Public License. See the file named LICENSE.
|
||||
|
||||
NOT ! 3
|
||||
EXISTS -e 12 OP_FILE
|
||||
ISREAD -r 12 OP_FILE
|
||||
ISWRITE -w 12 OP_FILE
|
||||
ISEXEC -x 12 OP_FILE
|
||||
|
||||
Reference in New Issue
Block a user