forked from ps2dev/ps2dev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheck-ps2dev.sh
executable file
·35 lines (24 loc) · 1.76 KB
/
check-ps2dev.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh
# check-pspdev.sh by Naomi Peori ([email protected])
## Check if $PS2DEV is set.
if test ! "$PS2DEV"; then { echo "ERROR: Set \$PS2DEV before continuing."; exit 1; } fi
## Check if $PS2SDK is set.
if test ! "$PS2SDK"; then { echo "ERROR: Set \$PS2SDK before continuing."; exit 1; } fi
## Check for the $PS2DEV directory.
ls -ld "$PS2DEV" 1> /dev/null || mkdir -p "$PS2DEV" 1> /dev/null || { echo "ERROR: Create $PS2DEV before continuing."; exit 1; }
## Check for the $PS2SDK directory.
ls -ld "$PS2SDK" 1> /dev/null || mkdir -p "$PS2SDK" 1> /dev/null || { echo "ERROR: Create $PS2SDK before continuing."; exit 1; }
## Check for $PS2DEV write permission.
touch "$PS2DEV/test.tmp" 1> /dev/null || { echo "ERROR: Grant write permissions for $PS2DEV before continuing."; exit 1; }
## Check for $PS2SDK write permission.
touch "$PS2SDK/test.tmp" 1> /dev/null || { echo "ERROR: Grant write permissions for $PS2SDK before continuing."; exit 1; }
## Check for $PS2DEV/bin in the path.
echo "$PATH" | grep "$PS2DEV/bin" 1> /dev/null || { echo "ERROR: Add $PS2DEV/bin to your path before continuing."; exit 1; }
## Check for $PS2DEV/ee/bin in the path.
echo "$PATH" | grep "$PS2DEV/ee/bin" 1> /dev/null || { echo "ERROR: Add $PS2DEV/ee/bin to your path before continuing."; exit 1; }
## Check for $PS2DEV/iop/bin in the path.
echo "$PATH" | grep "$PS2DEV/iop/bin" 1> /dev/null || { echo "ERROR: Add $PS2DEV/iop/bin to your path before continuing."; exit 1; }
## Check for $PS2DEV/dvp/bin in the path.
echo "$PATH" | grep "$PS2DEV/dvp/bin" 1> /dev/null || { echo "ERROR: Add $PS2DEV/dvp/bin to your path before continuing."; exit 1; }
## Check for $PS2SDK/bin in the path.
echo "$PATH" | grep "$PS2SDK/bin" 1> /dev/null || { echo "ERROR: Add $PS2SDK/bin to your path before continuing."; exit 1; }