From bcd1ad7963cd60c66930cb017c1ffc8abd5d428c Mon Sep 17 00:00:00 2001 From: cyteen Date: Wed, 5 Jun 2024 10:20:27 +0100 Subject: [PATCH] Commit before push. --- 001_swap-caps.sh | 4 +- 001_swap-caps.zsh | 111 ++++++----- 020_canary-keymap.sh | 7 + 020_colemak-bbkt.sh | 186 ++++++++++++++++++ 020_debian-kernel.sh | 69 +++++++ 020_neovim-nvims.sh | 86 ++++++++ 020_zsh.sh | 35 ++-- 020_zsh_lazyshell.sh | 11 +- .../broken/020_marker-pdf_deb2dsp.sh | 60 ++++++ utils/push-deb-to-gitea.sh | 3 +- utils/renice_command.sh | 9 + 11 files changed, 510 insertions(+), 71 deletions(-) create mode 100644 020_canary-keymap.sh create mode 100644 020_colemak-bbkt.sh create mode 100644 020_debian-kernel.sh create mode 100644 020_neovim-nvims.sh create mode 100644 python_deb2dsp/broken/020_marker-pdf_deb2dsp.sh create mode 100644 utils/renice_command.sh diff --git a/001_swap-caps.sh b/001_swap-caps.sh index 64bf533..f9aa247 100644 --- a/001_swap-caps.sh +++ b/001_swap-caps.sh @@ -19,10 +19,10 @@ chmod +x ${DEST}/.xinitrc.d/setxkbmap.sh # Keyboard configuration adjustments config_file="/etc/default/keyboard" -typeset -A rules +declare -A rules rules=( "XKBMODEL" "pc105" - "XKBLAYOUT" "extd" + "XKBLAYOUT" "gb" "XKBVARIANT" "" "XKBOPTIONS" "caps:swapescape" "BACKSPACE" "guess" diff --git a/001_swap-caps.zsh b/001_swap-caps.zsh index 5f0c26d..06b209f 100755 --- a/001_swap-caps.zsh +++ b/001_swap-caps.zsh @@ -3,77 +3,98 @@ # https://thesynack.com/posts/persistent-capslock-behavior/ DEST=${1:-/etc/skel} # xmodmap -#cat > ~/.Xmodmap << 'EOF' -#! Swap caps lock and escape -#remove Lock = Caps_Lock -#keysym Escape = Caps_Lock -#keysym Caps_Lock = Escape -#add Lock = Caps_Lock -#EOF +# cat <-'EOF' | tee ~/.Xmodmap +# # ! Swap caps lock and escape +# remove Lock = Caps_Lock +# keysym Escape = Caps_Lock +# keysym Caps_Lock = Escape +# add Lock = Caps_Lock +# EOF # #xmodmap ~/.Xmodmap -#cat </dev/null -#[Desktop Entry] -#Name=Xmodmap -#Exec=/usr/bin/xmodmap ${HOME}/.Xmodmap -#Terminal=false -#Type=Application -#X-GNOME-Autostart-enabled=true -#EOF +# cat <<-EOF | sudo tee ${HOME}/.config/autostart/xmodmap.desktop >/dev/null +# [Desktop Entry] +# Name=Xmodmap +# Exec=/usr/bin/xmodmap ${HOME}/.Xmodmap +# Terminal=false +# Type=Application +# X-GNOME-Autostart-enabled=true +# EOF # #chmod +x ~/.config/autostart/xmodmap.desktop # Console tty -#cat </dev/null -#!/usr/bin/env bash +## current XKN settings +# setxkbmap -v 9 +# +# Setting verbose level to 9 +# locale is C +# Trying to load rules file ./rules/evdev... +# Trying to load rules file /usr/share/X11/xkb/rules/evdev... +# Success. +# Applied rules from evdev: +# rules: evdev +# model: pc104 +# layout: gb +# options: caps:swapescape +# Trying to build keymap using the following components: +# keycodes: evdev+aliases(qwerty) +# types: complete +# compat: complete +# symbols: pc+gb+inet(evdev)+capslock(swapescape) +# geometry: pc(pc104) -setxkbmap -model pc104 -layout gb,us -option caps:swapecape -EOF - -chmod +x ${DEST}/.xinitrc.d/setxkbmap.sh +# setxkbmap -model pc104 -layout gb,us -variant ,dvorak -option caps:swapecape +# setxkbmap -v 9 -option "" -option "misc:extend,lv5:caps_switch_lock,compose:menu". +# mkdir -p ${DEST}/.xinitrc.d +# +# cat <<-EOF | tee ${DEST}/.xinitrc.d/setxkbmap.sh >/dev/null +# #!/usr/bin/env bash +# +# setxkbmap -model pc104 -layout gb,us -option "caps:swapescape" +# EOF +# +# chmod +x ${DEST}/.xinitrc.d/setxkbmap.sh # default keyboard layout is described in /etc/default/keyboard and it is shared between X and the console. -# FIXME:man keyboard says to use VARIABLE=VALUE not the space separated below. - +# "lv3:lwin_switch,caps:swapescape,compose:caps" config_file="/etc/default/keyboard" typeset -A rules rules=( - "XKBMODEL" "pc105" - "XKBLAYOUT" "extd" + "XKBMODEL" "pc104" + "XKBLAYOUT" "gb" "XKBVARIANT" "" "XKBOPTIONS" "caps:swapescape" - "BACKSPACE" "guess" + "BACKSPACE" "guess" ) for rule in "${(@k)rules}"; do - regex="s/^#\?\(${rule}\s*\).*$/\1 ${rules[${rule}]}/" - # regex="s/^#\?\(${rule}\s*\).*$/\1=${rules[${rule}]}/" - sudo sed -i "${regex}" ${config_file}; + regex="s|^#\?\(${rule}\s*\).*$|\1\=\"${rules[${rule}]}\"|" + sudo sed -i "${regex}" ${config_file}; done + sudo udevadm trigger --subsystem-match=input --action=change -#cat < /dev/null -#Section "InputClass" -# Identifier "system-keyboard" -# MatchIsKeyboard "on" -# Option "XkbLayout" "gb,us" -# Option "XkbModel" "pc104" -# Option "XkbVariant" "" -# Option "XkbOptions" "caps:swapescape" -#EndSection -#EOF +# cat <<-EOF | sudo tee /etc/X11/xorg.conf.d/00-keyboard.conf > /dev/null +# Section "InputClass" +# Identifier "system-keyboard" +# MatchIsKeyboard "on" +# Option "XkbLayout" "gb,us" +# Option "XkbModel" "pc104" +# Option "XkbVariant" "" +# Option "XkbOptions" "caps:swapescape" +# EndSection +# EOF #echo "enlightenment desktop settings-input-keyboard allowd swapping esc with caps." diff --git a/020_canary-keymap.sh b/020_canary-keymap.sh new file mode 100644 index 0000000..31fcd77 --- /dev/null +++ b/020_canary-keymap.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +wget \ + https://github.com/Apsu/Canary/releases/download/v1.0/canary \ + -O /usr/share/X11/xkb/symbols/canary + +# setxkbmap canary diff --git a/020_colemak-bbkt.sh b/020_colemak-bbkt.sh new file mode 100644 index 0000000..19fd65e --- /dev/null +++ b/020_colemak-bbkt.sh @@ -0,0 +1,186 @@ +#!/usr/bin/env bash + +# Installs colmak keyboard layout and keyboard layers using alt-GR as a modifier + +# See DREYMAR'S BigBag XKB topic on the Colemak Forums. +# There are plenty of explanations and further links in there. +# http://forum.colemak.com/viewtopic.php?id=1438 + +sudo apt install -y debconf-utils + +# Checkinstall to produce a deb package +cd /var/tmp || exit + +GITHUB_USER=DreymaR +PROJECT=BigBagKbdTrixXKB +ARCH=$(dpkg --print-architecture) +# RELEASE=$(lastversion --format="tag" "${GITHUB_USER}/${PROJECT}") #$(lastversion --form "${PROJECT}") +# LATEST_URL="https://api.github.com/repos/${GITHUB_USER}/${PROJECT}/releases/latest" +# RELEASE=$(curl -L -s -H 'Accept: application/json' "${LATEST_URL}" | grep -Po '"tag_name": "v\K[^"]*') +# GIT_TAG=$(curl -L -s -H 'Accept: application/json' "${LATEST_URL}" | jq -r .tag_name) +# DOWNLOAD_DIR=/tmp +RELEASE=git + +RSS_FEED="https://github.com/${GIT_USER}/${PROJECT}/releases.atom" +# xdg-open ${RSS_FEED} +echo ${RSS_FEED} + +# make a containing directory +mkdir -p /var/tmp/${PROJECT}-"${RELEASE}" +echo "git clone --depth 1 https://github.com/${GITHUB_USER}/${PROJECT} /var/tmp/${PROJECT}-${RELEASE}" +git clone --depth 1 https://github.com/${GITHUB_USER}/${PROJECT} /var/tmp/${PROJECT}-"${RELEASE}" +cd /var/tmp/${PROJECT}-"${RELEASE}" || exit + +cat <<-EOF | tee ./description-pak + DreymaR's Big Bag of Keyboard Tricks +EOF + +cat <<-EOF | tee ./checkinstall_it.sh + + echo "ENTERING CHECKINSTALL" + + BASE_URL='https://raw.githubusercontent.com/' + BASE_USER=${GITHUB_USER} + BASE_REPO=${PROJECT} + LICENSE_URL="${BASE_URL}/${BASE_USER}/${BASE_REPO}"/master/LICENSE.md + # wget -c ${LICENSE_URL} + + VERSION=$(date +%Y-%m-%d_)git + # VERSION=${RELEASE} + RELEASE="1" + LICENSE=MIT + LOCAL_USER=${USER} + + # make a new temporary directory for this use + BASE_TMP_DIR=~/tmptmp/checkinstall_tmp + mkdir -p \${BASE_TMP_DIR} + + # do your work + sudo checkinstall -y --fstrans \ + --exclude=/root/.sudo_as_admin_successful \ + --exclude=/home/\${LOCAL_USER}/.sudo_as_admin_successful \ + --pkgname=\${PROJECT} \ + --pkgversion=\${VERSION}\ + --pkgrelease="\${RELEASE}" \ + --pkgarch=${ARCH} \ + --pkggroup=development \ + --pkglicense=MIT \ + --pkgsource=${LATEST_URL} \ + --maintainer=cyteen@ring-zero.co.uk \ + --requires=vim,git \ + -D \ + sudo bash ./install.sh +EOF + +# HelpStr= +# Usage: bash ${MyNAME} [optional args] [ [ ]] +# Run this from the directory containing the x-mod dir +# =========================================================== +# [-#] Functionality - 'default' +# =========================================================== +# [-i] - ${InstDir} +# [-c] Change path to X11 - ${X11DIR} +# [-o] Override install path w/ X11 - ${WriteSys} +# [-b] Force backup | location - ${X11DIR} +# [-n] Force no backup | default - ${DoBackup} +# [-r] <#> Restore backup | 1 is oldest - ${Restore} +# [-d] - ${DModDir} +# [-m] - ${SubDirs} +# [-t] - ${DModTag} +# [-g] Install GTK 2.0/3.0 edit config? - ${InstGTK} +# [-x] Run the setkb script afterwards? - ${SetXMap} +# [-s] Install without using sudo? - ${NoSudo} +# [--] [Setxkb ShortStr ] - ${SetXStr} + +DMod='xkb-data_xmod' +XVERSION='' +ModDATE='' +DModTag="${DMod}${XVERSION:+'_v'}${XVERSION}${ModDATE:+'_'}${ModDATE}" + +X11DIR="/usr/share/X11" +DBakFix='dbak-' # (--) Backup dir prefix +DModFix='d' # (--) Modded dir prefix +InstDir="${X11DIR}" # (-i) Path to install subfolder(s) in +#~ InstDir="${HOME}/dreymar-xmod" +WriteSys='no' # (-o) Overwrite the original xkb dir with the modded one +Restore='0' # (-r) Reverse: Restore from backup # instead of installing +DoBackup='ifnone' # (-n/b) Default backup behavior is "if no backups are found" +SubDirs='all' # (-m) Directory/-ies inside X11 to modify (e.g., 'xkb locale', 'all') +InstGTK='no' # (-g) Whether to install the GTK 2.0/3.0 config (if not present) +NoSudo='no' # (-s) Do not use sudo. Helpful for local dir installation. +SetXMap='no' # (-x) Whether to run the setkb script after installing +SetXStr='5caws us us' # (--) Shortcut string for setkb - 'kbd loc sym' (model layout eD-variant) + +cat <<-EOF | tee ./install.sh + #!/bin/bash + + bash install-dreymar-xmod.sh \ + -i ${InstDir} \ + -c ${X11DIR} \ + -o ${WriteSys} \ + -b ${X11DIR} \ + -n ${DoBackup} \ + -r ${Restore} \ + -d ${DModDir} \ + -m ${SubDirs} \ + -t ${DModTag} \ + -g ${InstGTK} \ + -x ${SetXMap} \ + -s ${NoSudo} \ + -- ${SetXStr} +EOF + +bash ./checkinstall_it.sh + +# To just get Extend with the currently active layout, use: +setxkbmap -v 9 -option "" -option "misc:extend,lv5:caps_switch_lock,compose:menu". + +# change your logon keyboard layout, use the dpkg-reconfigure command: +# sudo dpkg-reconfigure keyboard-configuration + +# debconf-get-selections | grep keyboard-configuration + +# selections before +# debconf-get-selections | grep keyboard-configuration >selections_before.conf + +# Make changes manually +# dpkg-reconfigure keyboard-configuration +# debconf-get-selections | grep keyboard-configuration >selections_after.conf + +# Use the tailored selections to avoid interaction +# sudo debconf-set-selections .orig.tar.xz need by the following make target +./debian/bin/genorig.py ${REMOTE_REPO} + +# This will apply the main quilt series to the upstream source +cd make -f debian/rules orig + +# Patch the sources +gbp pq --time-machine=10 --force import +gbp pq import ${PATCH_DIR}/*.patch +gbp pq apply + +# Export the Patches and Commit the Changes: +gbp pq export --commit -v debian/patches/features/arm64 + +# Post patch / rebase commit. +git add debian/patches +git commit -m "Applied Rockchip patches." + +popd diff --git a/020_neovim-nvims.sh b/020_neovim-nvims.sh new file mode 100644 index 0000000..aea468c --- /dev/null +++ b/020_neovim-nvims.sh @@ -0,0 +1,86 @@ +#!/usr/bin/env bash + +# nvims Safely experiment with multiple Neovim configurations. + +# Checkinstall to produce a deb package +cd /var/tmp || exit + +DEST=${1:-/etc/skel} +GITHUB_USER=traap +PROJECT=nvims +ARCH=$(dpkg --print-architecture) +# RELEASE=$(lastversion --format="tag" "${GITHUB_USER}/${PROJECT}") #$(lastversion --form "${PROJECT}") +LATEST_URL="https://api.github.com/repos/${GITHUB_USER}/${PROJECT}/releases/latest" +# RELEASE=$(curl -L -s -H 'Accept: application/json' "${LATEST_URL}" | grep -Po '"tag_name": "v\K[^"]*') +# GIT_TAG=$(curl -L -s -H 'Accept: application/json' "${LATEST_URL}" | jq -r .tag_name) +# DOWNLOAD_DIR=/tmp +RELEASE=git + +RSS_FEED="https://github.com/${GIT_USER}/${PROJECT}/releases.atom" +# xdg-open ${RSS_FEED} +echo ${RSS_FEED} + +# make a containing directory +mkdir -p /var/tmp/${PROJECT}-"${RELEASE}" +echo "git clone --depth 1 https://github.com/${GITHUB_USER}/${PROJECT} /var/tmp/${PROJECT}-${RELEASE}" +git clone --depth 1 https://github.com/${GITHUB_USER}/${PROJECT} /var/tmp/${PROJECT}-"${RELEASE}" +cd /var/tmp/${PROJECT}-"${RELEASE}" || exit + +cat <<-EOF | tee ./description-pak + Safely experiment with multiple Neovim configurations. +EOF + +cat <<-EOF | tee ./checkinstall_it.sh + + echo "ENTERING CHECKINSTALL" + + BASE_URL='https://raw.githubusercontent.com/' + BASE_USER=${GITHUB_USER} + BASE_REPO=${PROJECT} + LICENSE_URL="\${BASE_URL}/\${BASE_USER}/\${BASE_REPO}"/master/LICENSE + # wget -c \${LICENSE_URL} + + VERSION=\$(date +%Y-%m-%d_)git + # VERSION=${RELEASE} + RELEASE="1" + LICENSE=bsd + + # make a new temporary directory for this use + BASE_TMP_DIR=~/tmptmp/checkinstall_tmp + mkdir -p \${BASE_TMP_DIR} + + # do your work + sudo checkinstall -y --fstrans \ + --exclude=/home/${USER}/.sudo_as_admin_successful \ + --pkgname=neovim-\${BASE_REPO} \ + --pkgversion=\${VERSION}\ + --pkgrelease="\${RELEASE}" \ + --pkgarch=\${ARCH} \ + --pkggroup=development \ + --pkglicense=\$LICENSE \ + --pkgsource=${LATEST_URL} \ + --maintainer=cyteen@ring-zero.co.uk \ + --requires=fzf,git \ + -D \ + bash ./install_it.sh +EOF + +cat <<-EOF | tee ./install_it.sh + # Copy files to their production locations. + sudo cp -v nvims /usr/local/bin/. + sudo chmod -v +x /usr/local/bin/nvims +EOF + +# Create config directory and copy files there. +sudo -u ${USER} bash -c "mkdir -p "${DEST}"/.config/nvims" +sudo -u ${USER} bash -c "cp -v neovim_distros "${DEST}"/.config/nvims/." + +# Each install of an nvim has an alias appended to nvim-appname so we +# sources it in our environment. +cat <<-EOF | tee ${HOME}/.zshrc.d/008_nvims_appnames.zsh + if [[ -f "${HOME}/.config/nvims/nvim_appnames" ]]; then + source "${HOME}/.config/nvims/nvim_appnames" + fi +EOF + +bash ./checkinstall_it.sh diff --git a/020_zsh.sh b/020_zsh.sh index 91bb393..a19911a 100755 --- a/020_zsh.sh +++ b/020_zsh.sh @@ -22,7 +22,7 @@ set -x # There are insecure directories: /usr/local/share/zsh/site-functions # compaudit | xargs chmod g-w # compaudit 2>&1 | sed -n '1d; p' - + mkdir -p /usr/local/share/zsh/site-functions chmod g-w /usr/local/share/zsh/site-functions @@ -42,15 +42,14 @@ git clone http://github.com/ohmyzsh/ohmyzsh ${DEST}/.zgen/robbyrussell/ohmyzsh #ln -sfr ${DEST}/zsh-quickstart-kit/zsh/.zgen-setup ${DEST}/.zgen-setup #ln -sfr ${DEST}/zsh-quickstart-kit/zsh/.zsh_completions ${DEST}/.zsh-completions mkdir -p ${DEST}/.zshrc.d -echo "setopt PROMPT_SUBST" >> ${DEST}/.zshrc +echo "setopt PROMPT_SUBST" >>${DEST}/.zshrc - -echo "NVIM_PYTHON_LOG_FILE=/var/tmp/nvim_python.log" >> ${DEST}/.zshrc.d/008_nvim.zsh -echo "NVIM_PYTHON_LOG_LEVEL=DEBUG" >> ${DEST}/.zshrc.d/008_nvim.zsh +echo "NVIM_PYTHON_LOG_FILE=/var/tmp/nvim_python.log" >${DEST}/.zshrc.d/008_nvim.zsh +echo "NVIM_PYTHON_LOG_LEVEL=DEBUG" >>${DEST}/.zshrc.d/008_nvim.zsh touch /var/tmp/nvim_python.log # Fix for using urls on the commandline -cat >> ${DEST}/.zshrc.d/005_url-quote-magic.zsh <>${DEST}/.zshrc.d/005_url-quote-magic.zsh < ${DEST}/.zshrc.d/005-locatedb.zsh +echo "export LOCATE_PATH=/var/lib/mlocate/mlocate.db" >${DEST}/.zshrc.d/005-locatedb.zsh # add plugins to the load-starter-plugin-list() function in ${DEST}/.zgen-setup ${DEST}/zsh-quickstart-kit/zsh/.zgen-setup -# FIXED: create a file named .zgen-local-plugins and add your zgen load commands there. +# FIXED: create a file named .zgen-local-plugins and add your zgen load commands there. # Don't forget to run `zgen save` at the end of your .zgen-local-plugins file. # Warning: .zgen-local-plugins REPLACES the starter list setup, it doesn't add to it. #sed -i -e "s|zgen load srijanshetty/docker-zsh|# zgen load srijanshetty/docker-zsh|" ${DEST}/zsh-quickstart-kit/zsh/.zgen-setup #sed -i '/\# zgen load srijanshetty\/docker-zsh/a\ \ zgen load oh-my-zsh plugins\/docker\n\ \ zgen load oh-my-zsh plugins\/docker-compose' ${DEST}/zsh-quickstart-kit/zsh/.zgen-setup # The contents of the starter plugin function with changes above, pulling from upstream git with now not squash local changes. -cat > ${DEST}/.zgen-local-plugins << 'EOF' +cat >${DEST}/.zgen-local-plugins <<'EOF' echo "creating a zgen save" ZGEN_LOADED=() ZGEN_COMPLETIONS=() @@ -216,26 +215,25 @@ EOF # example .d file use unset to prevent update #echo '# Use unset 'QUICKSTART_KIT_REFRESH_IN_DAYS' to disable.' > ${DEST}/.zshrc.d/001-quickstart_refresh.zsh #echo 'QUICKSTART_KIT_REFRESH_IN_DAYS=30' >> ${DEST}/.zshrc.d/001-quickstart_refresh.zsh -echo 'ZGEN_PLUGIN_UPDATE_DAYS=30' > ${DEST}/.zshrc.d/001_zgen-refresh.zsh +echo 'ZGEN_PLUGIN_UPDATE_DAYS=30' >${DEST}/.zshrc.d/001_zgen-refresh.zsh apt install -y fonts-powerline powerline # sed -i 's,^\(export LOCATE_PATH=\).*,\1'/var/lib/mlocate/mlocate.db',' ${DEST}/.zshrc # Use powerline-daemon to speedup the prompt. -echo 'powerline-daemon -q' > ${DEST}/.zshrc.d/006_powerline-daemon.zsh - +echo 'powerline-daemon -q' >${DEST}/.zshrc.d/006_powerline-daemon.zsh sed -i 's,^\(CHARMAP=\).*,\1'\"UTF-8\"',' /etc/default/console-setup # set theme for zsh -cat > ${DEST}/.zshrc.d/002_theme.zsh << 'EOF' +cat >${DEST}/.zshrc.d/002_theme.zsh <<'EOF' # https://zshthem.es/browse-zsh-themes/ ZSH_THEME="agnoster" # powerline based theme #ZSH_THEME="3den" #ZSH_THEME="Pure" EOF -cat > ${DEST}/.zshrc.d/001_vi-mode.sh << 'EOF' +cat >${DEST}/.zshrc.d/001_vi-mode.sh <<'EOF' # Set vi mode bindkey -v bindkey '^R' history-incremental-search-backward @@ -256,16 +254,13 @@ EOF # fi # done #fi -#EOF +#EOF # alias python version # tell bash to check the next word after the alias (i.e sudo) by adding a space to the end of the alias value. -echo "# tell bash to check the next word after the alias (i.e sudo) by adding a space to the end of the alias value." > ${DEST}/${ALIAS_DIR}/002_sudo.zsh -echo 'alias sudo="sudo "' >> ${DEST}/${ALIAS_DIR}/002_sudo.zsh - - - +echo "# tell bash to check the next word after the alias (i.e sudo) by adding a space to the end of the alias value." >${DEST}/${ALIAS_DIR}/002_sudo.zsh +echo 'alias sudo="sudo "' >>${DEST}/${ALIAS_DIR}/002_sudo.zsh chown -R root.root /usr/local/share/zsh/site-functions chmod -R 755 /usr/local/share/zsh/site-functions diff --git a/020_zsh_lazyshell.sh b/020_zsh_lazyshell.sh index d8825e0..f39f634 100644 --- a/020_zsh_lazyshell.sh +++ b/020_zsh_lazyshell.sh @@ -1,7 +1,12 @@ +#!/usr/bin/env bash + +# LazyShell is a GPT powered utility for Zsh that helps you write and modify +# console commands using natural language. + sudo apt-et install -y jq curl -# Zsh plugins live in the `$ZSH_CUSTOM` directory if you use ohmyzsh and ~/.zsh/plugins otherwise - +# Zsh plugins live in the `$ZSH_CUSTOM` directory if you use ohmyzsh and +# ~/.zsh/plugins otherwise DEST=${1:-$HOME} PLUGINS_DIR=${DEST}/.zsh/plugins @@ -12,7 +17,7 @@ mkdir -p "${PLUGINS_DIR}" # the plugin checks for the OPENAI_API_KEY environment variable so we need to put # your your_api_keys in .zshrc.pre-plugins.d cat <<-EOF | sudo tee "$DEST/.zshrc.d/008_lazyshell.zsh" -[ -f ${PLUGINS_DIR}/lazyshell/lazyshell.zsh ] && source ${PLUGINS_DIR}/lazyshell/lazyshell.zsh + [ -f ${PLUGINS_DIR}/lazyshell/lazyshell.zsh ] && source ${PLUGINS_DIR}/lazyshell/lazyshell.zsh EOF git clone --depth 1 https://github.com/not-poma/lazyshell.git "${PLUGINS_DIR}"/lazyshell diff --git a/python_deb2dsp/broken/020_marker-pdf_deb2dsp.sh b/python_deb2dsp/broken/020_marker-pdf_deb2dsp.sh new file mode 100644 index 0000000..2ffbc96 --- /dev/null +++ b/python_deb2dsp/broken/020_marker-pdf_deb2dsp.sh @@ -0,0 +1,60 @@ +#!/bin/bash + +USER=VikParuchuri +PROJECT=marker + +git_url="https://github.com/${USER}/${PROJECT}" + +VERSION=$(curl "https://api.github.com/repos/${USER}/${PROJECT}/tags?per_page=5" | jq -r '.[0] | .name') + +RSS_FEED="https://github.com/${USER}/${PROJECT}/releases.atom" +# xdg-open ${RSS_FEED} + +# the dependencies for the python package +# sudo apt-get install python3-tifffile python3-sklearn +# sudo apt-get -f install + +# the dependencies for py2dsp +apt install -y pristine-tar pypi2deb python3-gnupg + +# if the build fails with 'unrecognized build system: pybuild' add +# export PYBUILD_SYSTEM=distutils +# to the debian/rules file. + +BUILD_HOME="/var/tmp/build_${PROJECT}-${VERSION#v}" + +mkdir -p "${BUILD_HOME}" +pushd "${BUILD_HOME}" || exit +echo "Running: py2dsp" +py2dsp --profile dpt --distribution unstable --revision 1 --github "${git_url}" +# strace -o /tmp/strace_output.txt py2dsp --profile dpt --distribution unstable --revision 1 --github "${git_url}" + +pushd "${BUILD_HOME}/result/${PROJECT}-${VERSION#v}" + +cat <