File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ # This script installs the w3c_validator python script by moving the
3
+ # w3c_validator.py and w3c_validator to the /usr/bin folder
4
+ # so that the w3c_validator script can be executed from anywhere.
5
+
6
+ # Check if the script is executed with root privileges
7
+ if [[ $EUID -ne 0 ]]; then
8
+ echo " Error: This script must be run with root privileges."
9
+ exit 1
10
+ fi
11
+
12
+ # Move w3c_validator.py and w3c_validator to /usr/bin
13
+ mv " ./w3c_validator.py" " /usr/bin"
14
+ mv " ./w3c_validator" " /usr/bin"
15
+
16
+ echo " Installation complete. To use the w3c_validator, simply run the command:"
17
+ echo " w3c_validator file [files]"
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ # calls the w3c_validator.py and passes the arguments
3
+ # to it
4
+
5
+ if [ -e " ./w3c_validator.py" ]; then
6
+ python3 " ./w3c_validator.py" " $@ "
7
+ else
8
+ echo " Error: w3c_validator.py not found"
9
+ fi
You can’t perform that action at this time.
0 commit comments