Last active
November 29, 2024 12:21
-
-
Save RichAyotte/0ff73d22fe792b172a2f70ef3e74cbea to your computer and use it in GitHub Desktop.
Install VueScan on Debian
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#title :install-vuescan.sh | |
#description :This script will install VueScan onto a Debian system | |
#author :Richard Ayotte | |
#usage :install-vuescan.sh vuescan.tgz | |
#requirements :alien, the Industrial GTK theme and sudo access | |
#============================================================================== | |
if [ "$#" -ne 1 ]; then | |
echo "You must specify the VueScan tgz file." | |
exit | |
fi | |
target=/tmp | |
tar -xzf $1 -C $target | |
cd $target/VueScan | |
if [ "$PWD" != "$target/VueScan" ]; then | |
echo "The file provided is invalid. VueScan path is missing." | |
exit | |
fi | |
mkdir -p usr/local/bin | |
mkdir -p usr/local/share/applications | |
mkdir -p usr/local/share/vuescan | |
# Create Desktop entry | |
cat <<EOT > usr/local/share/applications/vuescan.desktop | |
[Desktop Entry] | |
Name=VueScan | |
GenericName=Scan | |
Exec=vuescan | |
Icon=/usr/local/share/vuescan/vuescan.svg | |
Terminal=false | |
X-MultipleArgs=false | |
Type=Application | |
StartupNotify=true | |
Categories=GNOME;System; | |
Comment=Scanning | |
Keywords=scan;scanner; | |
EOT | |
# Create launch script | |
cat <<EOT > usr/local/bin/vuescan | |
#!/bin/sh | |
GTK2_RC_FILES=/usr/share/themes/Industrial/gtk-2.0/gtkrc /usr/local/share/vuescan/vuescan | |
EOT | |
chmod +x usr/local/bin/vuescan | |
mv vuescan* usr/local/share/vuescan/ | |
tar -czf vuescan.tgz usr/ | |
sudo alien --to-deb vuescan.tgz | |
sudo dpkg -i vuescan*.deb | |
rm -rf $target/VueScan | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment