amosproj / amos2022ws01-firmware-scraper

Scape firmware metadata from 18 vendors and download corresponding firmware images. Save in MySQL database for InfoSec research purposes.
MIT License
13 stars 2 forks source link

Shell script - running on Ubuntu #145

Closed IceFlovver closed 1 year ago

IceFlovver commented 1 year ago

User story

  1. As a user
  2. I want the Shell script to detect whether it's running on Ubuntu
  3. So that in case it isn't it would print a warning and not crash

Acceptance criteria

Definition of done (DoD)

DoD general criteria

IceFlovver commented 1 year ago

┌──(m1k3㉿emba)-[~/github-repos/amos2022ws01-firmware-scraper]

└─$ ./install.sh

zsh: keine Berechtigung: ./install.sh

┌──(m1k3㉿emba)-[~/github-repos/amos2022ws01-firmware-scraper]

└─$ ll ./install.sh

-rw-r--r-- 1 m1k3 m1k3 562 25. Jan 09:19 ./install.sh

Non Ubuntu:

┌──(m1k3㉿emba)-[~/github-repos/amos2022ws01-firmware-scraper]

└─$ ./install.sh

Checking system requirements

Setting up virtual environment

Error: name 'cmd' is not defined

./install.sh: Zeile 23: .venv/bin/activate: Datei oder Verzeichnis nicht gefunden

Installing dependencies...

Defaulting to user installation because normal site-packages is not writeable

ERROR: Could not open requirements file: [Errno 2] Datei oder Verzeichnis nicht gefunden: 'requirements.txt'

Setup complete!

On Ubuntu:

m1k3@ubuntu:~$ cd amos2022ws01-firmware-scraper/

m1k3@ubuntu:~/amos2022ws01-firmware-scraper$ chmod +x install.sh

m1k3@ubuntu:~/amos2022ws01-firmware-scraper$ ./install.sh

Checking system requirements

Setting up virtual environment

./install.sh: line 22: python: command not found

./install.sh: line 23: .venv/bin/activate: No such file or directory

Installing dependencies...

./install.sh: line 26: pip: command not found

Setup complete!