TechnologyClassroom / HardwareTest

Scripts to test the hardware of your computer
GNU Affero General Public License v3.0
6 stars 1 forks source link

Refactor multiple hwtest scripts into one script with various options #10

Open TechnologyClassroom opened 3 weeks ago

TechnologyClassroom commented 3 weeks ago

Currently, the three scripts (hwtest.sh, hwtestlanproprietary.sh, and hwtestproprietary.sh) are very redundant with only a few differences in each script. It would be better to merge them all into hwtest.sh and select various options with command line arguments such as with getopt. Default behavior should not differ from hwtest.sh to keep functionality consistent.

Examples of switch use could be:

bash hwtest.sh # Results in the current equivalent to hwtest.sh

bash hwtest.sh --proprietary # Results in the current equivalent to hwtestproprietary.sh

bash hwtest.sh --proprietary --lan 192.168.1.27:6001/hwteststore/ # Results in the current equivalent to hwtestlanproprietary.sh where 192.168.1.27:6001/hwteststore/ is the location of local binaries.