
gittech. site
for different kinds of informations and explorations.
Script to check the warranty status for HP, Lenovo
Warrantiak: Device Warranty Checker
warrantiak
is a shell script to check the warranty status of devices using their serial numbers. Currently, it supports Lenovo and HP devices, with plans to add support for DELL and Apple in the future.
Features
- Fetch device type and warranty information
- Display warranty start and end dates, product type, and model.
- Simple and easy-to-use command-line interface.
Table of Contents
Screenshots
Usage
Interactive
warrantiak
has a built-in interactive menu that can be executed as such:
./warrantiak
Non-interactive
For those who prefer to utilize command-line options, warrantiak
also has a non-interactive mode supporting both short and long options:
./warrantiak <optional-command-to-execute-directly>
Command-line arguments
Possible arguments in short and long form:
GENERATE OPTIONS
-L, --lenovo-check
check the warranty status of a Lenovo device
-H, --hp-check
check the warranty status of a HP device
Non-interactive S/N check
You can set the variable _SERIAL_NUMBER
export _SERIAL_NUMBER="SN123FOOBAR"
JSON output
You can set the variable _JSON_OUTPUT
export _JSON_OUTPUT="true"
UNIX and Linux
git clone https://github.com/be-lenka/warrantiak.git && cd warrantiak
sudo make install
For uninstalling, open up the cloned directory and run
sudo make uninstall
For update/reinstall
sudo make reinstall
System requirements
- An OS with a Bash shell
- Tools we use:
awk
sed
basename
cat
column
date
echo
grep
head
printf
read
Dependencies
bsdextrautils
apt install bsdextrautils
coreutils
apt install coreutils
gawk
apt install gawk
grep
apt install grep
Contribution
Want to contribute? Great! First, read this page.
Code reviews
All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose.
Some tips for good pull requests
- Use our code When in doubt, try to stay true to the existing code of the project.
- Write a descriptive commit message. What problem are you solving and what are the consequences? Where and what did you test? Some good tips: here and here.
- If your PR consists of multiple commits which are successive improvements /
fixes to your first commit, consider squashing them into a single commit
(
git rebase -i
) such that your PR is a single commit on top of the current HEAD. This make reviewing the code so much easier, and our history more readable.
Formatting
This documentation is written using standard markdown syntax. Please submit your changes using the same syntax.
Licensing
MIT see LICENSE for the full license text.
TLDR
If there if there is not this type off formatted output, please check your internet connection.