Verified Commit 0cc9f603 authored by tukusejssirs's avatar tukusejssirs
Browse files

Rolling release

- Add `acroread.sh` Bash installer;
- Add `rlwrap` as a dependency in `trans.sh` Bash installer (however, it still does not run on Fedora 32);
- Add `acroread.sh` Bash setting;
- Fix opening files with jBead using the `jbead.desktop` file in `jbead.sh` Bash installer;
- Fix determining the scanner device name in `scan.sh` Bash function (recently, it picked my webcam as a device; also, from now on the script uses the first result as the device).
parent 570d7283
......@@ -3,8 +3,8 @@
# Stripped down Bash RC file used at work
# author: Tukusej's Sirs
# date: 21 May 2020
# version: 0.4
# date: 5 June 2020
# version: 0.5
# Variables
......@@ -21,6 +21,7 @@ src "${PATH_STNGS}/lesspipe.sh"
src "${PATH_STNGS}/gcc_colours.sh"
src "${PATH_STNGS}/bash_completion.sh"
src "${PATH_STNGS}/export_bw_session.sh"
src "${PATH_STNGS}/acroread.sh"
# Interactive shells
if [[ $- == *i* ]]; then
......
#!/bin/bash
# This script eases scanning from terminal.
# author: Tukusej's Sirs
# date: 23 May 2020
# version: 1.3
# Usage: scanimage [grey|colour|lineart] [filename.ext]
# Exit codes:
# 0 success
# 1 invalid scanning mode
# 2 invalid file format
# scanimage [grey|colour|lineart] [filename.ext]
# author: Tukusej's Sirs
# date: 11 April 2019
# version: 1.2
# TODO:
# - retVal's are not working yet
#!/bin/bash
function scan(){
local retVal=0
# Device
......@@ -22,7 +24,7 @@ function scan(){
# SANE_DEFAULT_DEVICE=$(scanimage -f "%d")
# fi
# local device=$SANE_DEFAULT_DEVICE
local device=$(scanimage -f "%d")
local device=$(scanimage -f '%d%n' | sed '/\/dev\/video/d' | head -1)
# Options
local opt="-p --resolution 600"
......@@ -72,11 +74,5 @@ function scan(){
esac
# Actual command
# if [[ $retVal > 0 ]]; then
scanimage -d $device $opt --format=$format > "$filename"
# else
# return $retVal
# fi
unset retVal device opt filename format
scanimage -d $device $opt --format=$format > "$filename"
}
\ No newline at end of file
# This enables running Acrobat Reader as root
if [ $(which acroread &> /dev/null; echo $?) = 0 ]; then
export ACRO_ALLOW_SUDO=true acroread
fi
\ No newline at end of file
#!/bin/bash
# Install Acrobat Reader on Fedora 29+ and CentOS/RHEL 7
# author: Tukusej's Sirs
# date: 5 June 2020
# version: 1.0
# src: https://www.if-not-true-then-false.com/2010/install-adobe-acrobat-pdf-reader-on-fedora-centos-red-hat-rhel/
# Note: If you want to run Acrobat Reader as root, you must run it with ACRO_ALLOW_SUDO set to true, either as follows or export the variable in your .bashrc file
# ACRO_ALLOW_SUDO=true acroread
TEMP='/dev/shm'
DISTRO_NAME=$(grep -Po '^ID=\K.*$' /etc/os-release)
curl -o "$TEMP/acroread.rpm" ftp://ftp.adobe.com/pub/adobe/reader/unix/9.x/9.5.5/enu/AdbeRdr9.5.5-1_i486linux_enu.rpm
if [ "$DISTRO_NAME" = 'fedora' ]; then
# On Fedora, we need to install some extra 32-bit packages
EXTRA_PKGS='atk.i686 avahi-libs.i686 bzip2-libs.i686 cairo.i686 coreutils.x86_64 cups-libs.i686 dbus-libs.i686 expat.i686 fontconfig.i686 freetype.i686 fribidi.i686 gdk-pixbuf2-modules.i686 gdk-pixbuf2-xlib.i686 gdk-pixbuf2-xlib.x86_64 gdk-pixbuf2.i686 glib2.i686 glibc.i686 gmp.i686 gnutls.i686 graphite2.i686 gtk2.i686 harfbuzz.i686 jasper-libs.i686 jbigkit-libs.i686 keyutils-libs.i686 krb5-libs.i686 libblkid.i686 libcap.i686 libcom_err.i686 libdatrie.i686 libdrm.i686 libffi.i686 libgcc.i686 libgcrypt.i686 libglvnd-glx.i686 libglvnd.i686 libgpg-error.i686 libICE.i686 libidn.i686 libidn.x86_64 libidn2.i686 libjpeg-turbo.i686 libmount.i686 libpciaccess.i686 libpng.i686 libselinux.i686 libsepol.i686 libSM.i686 libstdc++.i686 libtasn1.i686 libthai.i686 libtiff.i686 libunistring.i686 libuuid.i686 libverto.i686 libX11-xcb.i686 libX11.i686 libXau.i686 libxcb.i686 libXcomposite.i686 libxcrypt.i686 libXcursor.i686 libXdamage.i686 libXext.i686 libXfixes.i686 libXft.i686 libXi.i686 libXinerama.i686 libxml2.i686 libXrandr.i686 libXrender.i686 libxshmfence.i686 libXt.i686 libXxf86vm.i686 lz4-libs.i686 mesa-libGL.i686 mesa-libglapi.i686 mesa-libGLU.i686 mesa-libGLU.x86_64 nettle.i686 openssl-libs.i686 p11-kit.i686 pango.i686 pangox-compat.i686 pangox-compat.x86_64 pcre.i686 pcre2.i686 pixman.i686 systemd-libs.i686 xz-libs.i686 zlib.i686'
else
# On CentOS/RHEL 7, we need nux-desktop repo
sudo yum -y install http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
fi
# Install the dependencies
sudo dnf install libcanberra-gtk2.i686 adwaita-gtk2-theme.i686 PackageKit-gtk3-module.i686 $EXTRA_PKGS
# Install Acrobat Reader
sudo rpm -Uvh --nodeps ./acroread.rpm
# Donwload a missing library
sudo curl -so "/opt/Adobe/Reader9/Reader/intellinux/lib/libidn.so.11" https://www.if-not-true-then-false.com/dl/libidn.so.11.6.18
# Remove the installation package
rm -rf "$TEMP/acroread.rpm"
\ No newline at end of file
......@@ -3,8 +3,8 @@
# This script installs jbead
# author: Tukusej's Sirs
# date: 8 January 2020
# version: 1.1
# date: 26 May 2020
# version: 1.2
url="https://www.jbead.ch/"$(curl -s https://www.jbead.ch/Download.html | grep -oP "href=\"\K.*linux.tar.gz")
......@@ -18,4 +18,7 @@ sudo 7za e /opt/jbead/jbead.jar -o/opt/jbead/ images/jbead-32.png
# Create .desktop file
# This makes jbead accessible from Gnome Applications menu
echo -e "[Desktop Entry]\nVersion=1.0\nName=jbead\nComment=Design bead rope crochet\nExec=/opt/jbead/jbead\nIcon=/opt/jbead/jbead-32.png\nTerminal=false\nType=Application\nStartupNotify=false\n\nX-Desktop-File-Install-Version=0.23" | sudo tee /usr/share/applications/jbead.desktop &>/dev/null&
\ No newline at end of file
echo -e "[Desktop Entry]\nVersion=1.0\nName=jbead\nComment=Design bead rope crochet\nExec=/opt/jbead/jbead %F\nIcon=/opt/jbead/jbead-32.png\nTerminal=false\nType=Application\nStartupNotify=false\nMimeType=text/plain\n\nX-Desktop-File-Install-Version=0.23" | sudo tee /usr/share/applications/jbead.desktop &> /dev/null &
# Build cache database of MIME types handled by desktop files
sudo update-desktop-database
\ No newline at end of file
......@@ -3,12 +3,12 @@
# This script builds and installs Translate Shell from source
# author: Tukusej's Sirs
# date: 7 January 2020
# version: 1.0
# date: 23 May 2020
# version: 1.1
# Install build and run-time dependencies (listing all except GNU Bash / Zsh and GNU Awk; when multiple options are available, I have chosen one)
sudo dnf -y install curl fribidi espeak less aspell
sudo dnf -y install curl fribidi espeak less aspell rlwrap
# Clone the repo
mkdir -p "${XDG_GIT_DIR}/others/trans"
......
......@@ -2,6 +2,7 @@ f## Change Log
| **Date** | **Changes** |
|-------------------|-------------|
| 05 June 2020 | Add `acroread.sh` Bash installer <br> Add `rlwrap` as a dependency in `trans.sh` Bash installer (however, it still does not run on Fedora 32) <br> Add `acroread.sh` Bash setting <br> Fix opening files with jBead using the `jbead.desktop` file in `jbead.sh` Bash installer <br> Fix determining the scanner device name in `scan.sh` Bash function (recently, it picked my webcam as a device; also, from now on the script uses the first result as the device) |
| 21 May 2020 | Fix `PATH_REPO_ROOT` in `bashrc_stripped.sh` |
| 21 May 2020 | Update `.bash_aliases`, but save the updated file to `bash/aliases/aliases.sh` <br> Remove `bashrc/bashrc_stripped.sh` <br> Move `bashrc/.bashrc` to `bash/bashrc/.bashrc` and quote all sourced paths in it |
| 21 May 2020 | Fix `PATH_REPO_ROOT` in `bashrc_stripped.sh` <br> Update `ssh_key_init.sh` Bash function, `teamviewer.sh` installer and `gnome_init.sh` script |
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment