Add Debian/Fedora dependency install scripts, rename Arch one
Splits install-deps.sh into per-distro scripts (install_deps_arch.sh, install_deps_debian.sh, install_deps_fedora.sh) since package names and managers differ; ascii-image-converter is built via go install on Debian/Fedora since it's AUR-only on Arch.master
parent
fab8cae8d4
commit
2163397ff1
|
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/bash
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y fswebcam v4l-utils python3-opencv golang-go
|
||||||
|
|
||||||
|
# ascii-image-converter isn't packaged for apt; build it with go instead
|
||||||
|
go install github.com/TheZoraiz/ascii-image-converter@latest
|
||||||
|
sudo install -Dm755 "$(go env GOPATH)/bin/ascii-image-converter" /usr/local/bin/ascii-image-converter
|
||||||
|
|
||||||
|
# lp group membership grants write access to /dev/lp0 for txt2printr.sh
|
||||||
|
if ! groups "$USER" | grep -qw lp; then
|
||||||
|
sudo usermod -aG lp "$USER"
|
||||||
|
echo "Added $USER to the lp group - log out and back in for this to take effect"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# parport/parport_pc expose the parallel port as /dev/lp0 via the lp driver
|
||||||
|
sudo modprobe parport parport_pc lp
|
||||||
|
echo -e "parport\nparport_pc\nlp" | sudo tee /etc/modules-load.d/parport.conf > /dev/null
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/bash
|
||||||
|
sudo dnf install -y fswebcam v4l-utils python3-opencv golang
|
||||||
|
|
||||||
|
# ascii-image-converter isn't packaged for dnf; build it with go instead
|
||||||
|
go install github.com/TheZoraiz/ascii-image-converter@latest
|
||||||
|
sudo install -Dm755 "$(go env GOPATH)/bin/ascii-image-converter" /usr/local/bin/ascii-image-converter
|
||||||
|
|
||||||
|
# lp group membership grants write access to /dev/lp0 for txt2printr.sh
|
||||||
|
if ! groups "$USER" | grep -qw lp; then
|
||||||
|
sudo usermod -aG lp "$USER"
|
||||||
|
echo "Added $USER to the lp group - log out and back in for this to take effect"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# parport/parport_pc expose the parallel port as /dev/lp0 via the lp driver
|
||||||
|
sudo modprobe parport parport_pc lp
|
||||||
|
echo -e "parport\nparport_pc\nlp" | sudo tee /etc/modules-load.d/parport.conf > /dev/null
|
||||||
19
readme.md
19
readme.md
|
|
@ -18,23 +18,26 @@ Both read the same `webcam.conf` / `ascii.conf` / `keybinds.conf` /
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- Arch Linux (or another `pacman`/AUR-based distro) is assumed by
|
|
||||||
`install-deps.sh`
|
|
||||||
- `fswebcam`, `ascii-image-converter`, `v4l-utils`
|
- `fswebcam`, `ascii-image-converter`, `v4l-utils`
|
||||||
- `python-opencv` (for `photobooth.py`)
|
- `python-opencv` (for `photobooth.py`)
|
||||||
- A V4L2-compatible webcam
|
- A V4L2-compatible webcam
|
||||||
- Optionally, a parallel-port printer wired up via `parport`/`parport_pc`/`lp`
|
- Optionally, a parallel-port printer wired up via `parport`/`parport_pc`/`lp`
|
||||||
kernel modules, for hardcopy prints
|
kernel modules, for hardcopy prints
|
||||||
|
|
||||||
Install everything with:
|
Install everything with the script for your distro:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
./install-deps.sh
|
./install_deps_arch.sh # Arch Linux / other pacman+AUR distros
|
||||||
|
./install_deps_debian.sh # Debian, Ubuntu, and other apt-based distros
|
||||||
|
./install_deps_fedora.sh # Fedora and other dnf-based distros
|
||||||
```
|
```
|
||||||
|
|
||||||
This installs [`yay`](https://aur.archlinux.org/packages/yay) if needed,
|
`install_deps_arch.sh` installs [`yay`](https://aur.archlinux.org/packages/yay)
|
||||||
installs the required packages, adds your user to the `lp` group (needed to
|
if needed and pulls `ascii-image-converter` from the AUR. The Debian/Fedora
|
||||||
write to `/dev/lp0`), and loads the parallel-port kernel modules.
|
scripts build `ascii-image-converter` with `go install` instead, since it
|
||||||
|
isn't packaged for `apt`/`dnf`. All three install the required packages, add
|
||||||
|
your user to the `lp` group (needed to write to `/dev/lp0`), and load the
|
||||||
|
parallel-port kernel modules.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
|
@ -101,5 +104,5 @@ for a couple of previously-tested printers.
|
||||||
|
|
||||||
## Other scripts
|
## Other scripts
|
||||||
|
|
||||||
- `yay-installer.sh` — installs the `yay` AUR helper (used by `install-deps.sh`)
|
- `yay-installer.sh` — installs the `yay` AUR helper (used by `install_deps_arch.sh`)
|
||||||
script (LUKS2/btrfs/FIDO2), unrelated to the photobooth itself, was origin
|
script (LUKS2/btrfs/FIDO2), unrelated to the photobooth itself, was origin
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue