Skip to content

Commit

Permalink
default path to software to add change to usb/LM
Browse files Browse the repository at this point in the history
  • Loading branch information
mars4science committed Jan 1, 2023
1 parent 289c99e commit a97cc82
Show file tree
Hide file tree
Showing 15 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Utils_misc_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

trap 'err=$?; echo >&2 "Exiting on error $err"; exit $err' ERR

if [ "x${software_path_root}" = "x" ] ; then software_path_root=/media/$(id -un)/usb/LM_20.2 ; fi
if [ "x${software_path_root}" = "x" ] ; then software_path_root=/media/$(id -un)/usb/LM ; fi

sudo cp "$software_path_root"/files.py $(get_install_path.sh)
sudo cp "$software_path_root"/files_functions.py $(get_install_path.sh)
Expand Down
2 changes: 1 addition & 1 deletion after_original_distro_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

# set variables in case run this script directly (not via _make_custom_liveusb.sh)

if [ "x${software_path_root}" = "x" ] ; then software_path_root=/media/$(id -un)/usb/LM_20.2 ; export software_path_root ; fi
if [ "x${software_path_root}" = "x" ] ; then software_path_root=/media/$(id -un)/usb/LM ; export software_path_root ; fi
if [ "x${work_path}" = "x" ] ; then work_path=/media/ramdisk ; export work_path ; fi
if [ "x${liveiso_path_scripts_root}" = "x" ] ; then liveiso_path_scripts_root=/usr/bin/am-scripts ; export liveiso_path_scripts_root ; fi

Expand Down
2 changes: 1 addition & 1 deletion apt_get.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ else
fi
# ===== #

if [ "x${software_path_root}" = "x" ] ; then software_path_root=/media/$(id -un)/usb/LM_20.2 ; fi
if [ "x${software_path_root}" = "x" ] ; then software_path_root=/media/$(id -un)/usb/LM ; fi
if [ "x${work_path}" = "x" ] ; then work_path=/media/ramdisk ; fi
default_local_debs="$software_path_root/debs"

Expand Down
2 changes: 1 addition & 1 deletion binaries_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# trap 'err=$?; echo >&2 "Exiting on error $err"; exit $err' ERR

if [ "x${software_path_root}" = "x" ] ; then software_path_root=/media/$(id -un)/usb/LM_20.2 ; fi
if [ "x${software_path_root}" = "x" ] ; then software_path_root=/media/$(id -un)/usb/LM ; fi

sudo cp --no-clobber "$software_path_root"/bin/the_rest/* "$(get_install_path.sh)"
# expected to have exec bit set in "$software_path_root", not setting here
Expand Down
2 changes: 1 addition & 1 deletion cinnamon_add_software.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# trap 'err=$?; echo >&2 "Exiting on error $err"; sleep 10; exit $err' ERR

# add applets/desklets software to Cinnamon
if [ "x${software_path_root}" = "x" ] ; then software_path_root=/media/$(id -un)/usb/LM_20.2 ; fi
if [ "x${software_path_root}" = "x" ] ; then software_path_root=/media/$(id -un)/usb/LM ; fi
sudo cp --recursive $software_path_root/cinnamon-applets/* /usr/share/cinnamon/applets

exit
Expand Down
2 changes: 1 addition & 1 deletion display_backlight_control_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# thinkpad specific
trap 'err=$?; echo >&2 "Exiting on error $err"; exit $err' ERR

if [ "x${software_path_root}" = "x" ] ; then software_path_root=/media/$(id -un)/usb/LM_20.2 ; fi
if [ "x${software_path_root}" = "x" ] ; then software_path_root=/media/$(id -un)/usb/LM ; fi
sudo cp "$software_path_root"/bin/night $(get_install_path.sh)
sudo chmod +xs $(get_install_path.sh)/night

2 changes: 1 addition & 1 deletion fan_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# thinkpad specific
trap 'err=$?; echo >&2 "Exiting on error $err"; exit $err' ERR

if [ "x${software_path_root}" = "x" ] ; then software_path_root=/media/$(id -un)/usb/LM_20.2 ; fi
if [ "x${software_path_root}" = "x" ] ; then software_path_root=/media/$(id -un)/usb/LM ; fi

sudo cp --no-clobber "$software_path_root"/bin/stopfan $(get_install_path.sh)
# sudo chown root /usr/bin/stopfan
Expand Down
2 changes: 1 addition & 1 deletion firefox-replace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if [ -h "$ff_installed_link" ]; then ff_link_symbolic=true; else ff_link_symboli
# therefore when $ff_installed_link is empty, then only one argument: -h so exprsssion AFAIK evaluates to true
# added "" (below too), so now expression has two arguments: -h and a string

if [ "x${software_path_root}" = "x" ] ; then software_path_root=/media/$(id -un)/usb/LM_20.2 ; fi
if [ "x${software_path_root}" = "x" ] ; then software_path_root=/media/$(id -un)/usb/LM ; fi
ff_archive_name=$(ls --sort=time $software_path_root | grep firefox- | head --lines=1)
ff_archive=$software_path_root/$ff_archive_name
if [ ! -f "$ff_archive" ]; then echo >&2 "Firefox archive to install from not found in $software_path_root, next is exit of the script"; exit 1; fi
Expand Down
2 changes: 1 addition & 1 deletion k_iwix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ link_path="$(get_software_path.sh)/$app_name"

if [ ! -e "$link_path" ]; then
if [ ! -d $(dirname "$link_path") ]; then sudo mkdir $(dirname "$link_path"); fi
if [ "x${software_path_root}" = "x" ] ; then software_path_root=/media/$(id -un)/usb/LM_20.2 ; fi
if [ "x${software_path_root}" = "x" ] ; then software_path_root=/media/$(id -un)/usb/LM ; fi

# not moved to /bin/appimages as cannot be run w/out workaround below
copyfrom_path="$software_path_root/kiwix-desktop_x86_64_2.1.0.appimage"
Expand Down
2 changes: 1 addition & 1 deletion networking_tweaks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
trap 'err=$?; echo >&2 "Exiting on error $err"; exit $err' ERR

# for future use
if [ "x${software_path_root}" = "x" ] ; then software_path_root=/media/$(id -un)/usb/LM_20.2 ; fi
if [ "x${software_path_root}" = "x" ] ; then software_path_root=/media/$(id -un)/usb/LM ; fi

# enable packet forwarding for IPv4, IPv6
sudo sed -i -- 's/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/' /etc/sysctl.conf
Expand Down
2 changes: 1 addition & 1 deletion setup_youtube-downloaders.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# trap 'err=$?; echo >&2 "Exiting on error $err"; exit $err' ERR

# alternative to youtube-dl, have read (and saw) work fast when youtube-dl is slow to download
if [ "x${software_path_root}" = "x" ] ; then software_path_root=/media/$(id -un)/usb/LM_20.2 ; fi
if [ "x${software_path_root}" = "x" ] ; then software_path_root=/media/$(id -un)/usb/LM ; fi
sudo cp --no-clobber "$software_path_root"/bin/yt-dlp $(get_install_path.sh)
sudo chmod +x $(get_install_path.sh)/yt-dlp

Expand Down
2 changes: 1 addition & 1 deletion to_iso_to_run_once_liveiso_boot/transmission_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# copy configs that set upload speed limit and seeding limits.

# if current user is root (e.g. chrooted duriong liveUSB creation), then ~ would exist, but not /home/$(id -u -n)
if [ "x${software_path_root}" = "x" ] ; then software_path_root=/media/$(id -un)/usb/LM_20.2 ; fi
if [ "x${software_path_root}" = "x" ] ; then software_path_root=/media/$(id -un)/usb/LM ; fi
# for liveUSB boot
if [ ! -e "${software_path_root}" ] ; then software_path_root=liveiso_path_settings_root ; fi

Expand Down
2 changes: 1 addition & 1 deletion to_iso_to_run_once_liveiso_boot/xscreensaver_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# copy configs that set upload speed limit and seeding limits.

# if current user is root (e.g. chrooted duriong liveUSB creation), then ~ would exist, but not /home/$(id -u -n)
if [ "x${software_path_root}" = "x" ] ; then software_path_root=/media/$(id -un)/usb/LM_20.2 ; fi
if [ "x${software_path_root}" = "x" ] ; then software_path_root=/media/$(id -un)/usb/LM ; fi
# for liveUSB boot
if [ ! -e "${software_path_root}" ] ; then software_path_root=liveiso_path_settings_root ; fi

Expand Down
2 changes: 1 addition & 1 deletion w_browser.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ display_help "$help_message$common_help"
# see https://unix.stackexchange.com/questions/676608/bash-negation-of-a-file-exists-does-not-change-result-whereas-for-e-chang
if [ ! -f "$link_path" ]; then
if [ ! -d $(dirname "$link_path") ]; then sudo mkdir --parents $(dirname "$link_path"); fi
if [ "x${software_path_root}" = "x" ] ; then software_path_root=/media/$(id -un)/usb/LM_20.2 ; fi
if [ "x${software_path_root}" = "x" ] ; then software_path_root=/media/$(id -un)/usb/LM ; fi
w_browser_archive_path=$software_path_root/$(ls --sort=time $software_path_root | grep browser | head --lines=1)
if [ ! -f "$w_browser_archive_path" ]; then echo >&2 " ERROR/Error: file with browser to add at path : $w_browser_archive_path not found, exiting with error code 1"; exit 1; fi
sudo cp "$w_browser_archive_path" $(dirname "$link_path")
Expand Down
4 changes: 2 additions & 2 deletions wine_download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ sudo sed --in-place '/winehq/d' $(grep winehq /etc/apt/sources.list /etc/apt/sou
sudo apt-get update

# https://wiki.winehq.org/Gecko
path_to_gecko="/media/$(id -un)/usb/LM_20.2/wine-gecko"
path_to_gecko="/media/$(id -un)/usb/LM/wine-gecko"
if [ -e "$path_to_gecko" ]; then echo >&2 "folder for wine-gecko at $path_to_gecko already exists, exiting with error"; exit 1; fi
mkdir $path_to_gecko
mkdir $path_to_gecko/5.0 && cd $_
Expand All @@ -35,7 +35,7 @@ wget http://dl.winehq.org/wine/wine-gecko/2.47.2/wine-gecko-2.47.2-x86_64.msi
wget http://dl.winehq.org/wine/wine-gecko/2.47.2/wine-gecko-2.47.2-x86_64.tar.xz

# https://wiki.winehq.org/Mono
path_to_mono="/media/$(id -un)/usb/LM_20.2/wine-mono"
path_to_mono="/media/$(id -un)/usb/LM/wine-mono"
if [ -e "$path_to_mono" ]; then echo >&2 "folder for wine-mono at $path_to_mono already exists, exiting with error"; exit 1; fi
mkdir $path_to_mono

Expand Down

0 comments on commit a97cc82

Please sign in to comment.