diff --git a/010_apt-get.sh b/010_apt-get.sh index ae3a672..f3647bf 100755 --- a/010_apt-get.sh +++ b/010_apt-get.sh @@ -41,6 +41,7 @@ apt install -y socat apt install -y youtube-dl apt install -y tor apt install -y torsocks +apt install -y proxychains4 apt install -y cmus #apt install -y scdl # build from git or pip install -y #apt install -y checkinstall -y diff --git a/020_docker.sh b/020_docker.sh index 2a05d36..c527dab 100755 --- a/020_docker.sh +++ b/020_docker.sh @@ -6,6 +6,7 @@ set -x #echo '#bash -c "apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D"' > /etc/apt/sources.list.d/docker.list #echo "deb http://apt.dockerproject.org/repo debian-stretch main" >> /etc/apt/sources.list.d/docker.list +mkdir -p /etc/apt/sources.list-available echo "#bash -c "curl -fsSL https://${URL}/linux/debian/gpg | apt-key add -"" > /etc/apt/sources.list-available/docker.list echo "deb https://${URL}/linux/debian buster stable" >> /etc/apt/sources.list-available/docker.list diff --git a/020_git-lfs.sh b/020_git-lfs.sh index 06826da..5d00296 100755 --- a/020_git-lfs.sh +++ b/020_git-lfs.sh @@ -1,51 +1,55 @@ #!/usr/bin/env bash -#!/usr/bin/env bash -set -x -# Using in combination with bfg to remove large binary files from a git repo and replace them with a pointer to a uri/url -# debianized repo -# git clone https://github.com/git-lfs/git-lfs +#set -x -#dist=$(lsb_release -c | cut -f2) -dist=$(cat /etc/devuan_version | awk -F '/' {'print $1'}) -if [ "$dist" == 'jessie' ]; then - DIST='jessie' -elif [ "$dist" == 'ascii' ]; then - DIST='stretch' -elif [ "$dist" == 'beowulf' ]; then - DIST='buster' -elif [ "$dist" == 'chimaera' ]; then - DIST= 'bullseye' -else [ "$dist" == 'ceres' ] - DIST='sid' -fi - -#DIST='stretch' -OS=debian - -DEST=/etc/apt/sources.list-available -LINK=/etc/apt/sources.list.d -mkdir -p ${DEST} -mkdir -p ${LINK} - -cat > ${DEST}/git-lfs.list << EOF -deb https://packagecloud.io/github/git-lfs/${OS}/ ${DIST} main -deb-src https://packagecloud.io/github/git-lfs/${OS}/ ${DIST} main -EOF - -ln -sfr ${DEST}/git-lfs.list ${LINK}/git-lfs.list - -gpg_key_url="https://packagecloud.io/github/git-lfs/gpgkey" - -echo -n "Importing packagecloud gpg key... " - # import the gpg key - curl -L "${gpg_key_url}" 2> /dev/null | apt-key add - &>/dev/null -echo "done." - -apt update - -apt install -y git-lfs -apt install -y -f - - -echo "See: http://github.com/git-lfs/git-lfs/wiki/Tutorial" +# git-lfs is now in debian +sudo apt-get install git-lfs +## Using in combination with bfg to remove large binary files from a git repo and replace them with a pointer to a uri/url +## debianized repo +## git clone https://github.com/git-lfs/git-lfs +# +##dist=$(lsb_release -c | cut -f2) +#dist=$(cat /etc/devuan_version | awk -F '/' {'print $1'}) +#if [ "$dist" == 'jessie' ]; then +# RELEASE='jessie' +#elif [ "$dist" == 'ascii' ]; then +# RELEASE='stretch' +#elif [ "$dist" == 'beowulf' ]; then +# RELEASE='buster' +#elif [ "$dist" == 'chimaera' ]; then +# RELEASE='bullseye' +#else [ "$dist" == 'ceres' ] +# RELEASE='sid' +#fi +# +#echo "Release set to: " ${RELEASE} +# +#RELEASE='buster' +#OS=debian +# +#DEST=/etc/apt/sources.list-available +#LINK=/etc/apt/sources.list.d +#mkdir -p ${DEST} +#mkdir -p ${LINK} +# +#cat > ${DEST}/git-lfs.list << EOF +#deb https://packagecloud.io/github/git-lfs/${OS}/ ${RELEASE} main +#deb-src https://packagecloud.io/github/git-lfs/${OS}/ ${RELEASE} main +#EOF +# +#ln -sfr ${DEST}/git-lfs.list ${LINK}/git-lfs.list +# +#gpg_key_url="https://packagecloud.io/github/git-lfs/gpgkey" +# +#echo -n "Importing packagecloud gpg key... " +# # import the gpg key +# curl -L "${gpg_key_url}" 2> /dev/null | apt-key add - &>/dev/null +#echo "done." +# +#apt update +# +#apt install -y git-lfs +#apt install -y -f +# +# +#echo "See: http://github.com/git-lfs/git-lfs/wiki/Tutorial" diff --git a/020_kicad.sh b/020_kicad.sh index f4749a7..953c75d 100644 --- a/020_kicad.sh +++ b/020_kicad.sh @@ -1,4 +1,4 @@ -apt-get -y install kicad kicad-libraries kicad-symbols kicad-footprints kicad-templates kicad-demos kicad-packages3d +sudo apt-get -y install kicad kicad-libraries kicad-symbols kicad-footprints kicad-templates kicad-demos kicad-packages3d # freerouting cd /var/tmp diff --git a/020_neovim-coc.sh b/020_neovim-coc.sh index 73612ee..665c17e 100644 --- a/020_neovim-coc.sh +++ b/020_neovim-coc.sh @@ -1,16 +1,24 @@ -# Coc is an intellisense engine for Vim/Neovim. +## Coc is an intellisense engine for Vim/Neovim. -https://github.com/neoclide/coc.nvim -https://github.com/neoclide/coc-snippets -https://github.com/neoclide/coc-python -https://github.com/neoclide/coc-rls - -https://github.com/rcjsuen/dockerfile-language-server-nodejs -https://github.com/mads-hartmann/bash-language-server -https://github.com/palantir/python-language-server +# https://github.com/neoclide/coc.nvim +# https://github.com/neoclide/coc-snippets +# https://github.com/neoclide/coc-python +# https://github.com/neoclide/coc-rls +# +# https://github.com/rcjsuen/dockerfile-language-server-nodejs +# https://github.com/mads-hartmann/bash-language-server +# https://github.com/palantir/python-language-server # https://github.com/golang/tools/tree/master/gopls +DEST=/etc/skel +NEOVIM_HOME=${DEST}/.config/neovim +LANGSERVER_CONF=${NEOVIM_HOME}/coc-settings.json + + + +# FIXME: Convert the following heredocs to jq + cat > ${LANGSERVER_CONF} < description-pak mkdir -p doc-pak && wget -c --directory-prefix doc-pak https://raw.githubusercontent.com/platformio/platformio-core/develop/README.rst echo "http://docs.platformio.org/en/latest/userguide/index.html" > doc-pak/README -sudo checkinstall -y --fstrans=no pip install -U https://github.com/platformio/platformio-core/archive/"${RELEASE}".zip +sudo checkinstall -y --fstrans=no pip3 install -U https://github.com/platformio/platformio-core/archive/"${RELEASE}".zip # install some platforms platformio platform install espressif8266 @@ -38,6 +38,7 @@ platformio platform install atmelavr # pip install puts the results in usr/local/bin so we don't have a path issue #platformio: /usr/local/bin/platformio +# https://dokk.org/documentation/platformio/v3.5.1/faq/#zsh-completion cat > ~/.zshrc.d/008_platformio.zsh << 'EOF' if [[ -d "/usr/local/bin/platormio" ]]; then diff --git a/020_vim.sh b/020_vim.sh index 7c5cc58..854295a 100755 --- a/020_vim.sh +++ b/020_vim.sh @@ -439,31 +439,39 @@ cp ${DEST}/.vimrc_pending ${DEST}/.vimrc HOME=${DEST} vim -V -E -s -c "source ${DEST}/.vimrc" -c "PluginInstall" -c "PluginUpdate" -c "qa!" # Install Coc plugins FIXME -#HOME=${DEST} vim -V -E -s -c "source ${DEST}/.vimrc" -c "CocInstall coc-java coc-go coc-python coc-flutter coc-css coc-cssmodules coc-xml coc-json coc-yaml coc-html coc-git coc-docker" -c "qa\!" +HOME=${DEST} vim -V -E -s -c "source ${DEST}/.vimrc" -c "CocInstall coc-java coc-go coc-python coc-flutter coc-css coc-cssmodules coc-xml coc-json coc-yaml coc-html coc-git coc-docker" -c "qa\!" -#HOME=${DEST} vim -V -E -s /tmp/tempdir <<-EOF -# :source ${DEST}/.vimrc -# :call coc#util#install() -# :CocStart -# :CocInstall coc-java coc-go coc-python coc-flutter coc-css coc-cssmodules coc-xml coc-json coc-yaml coc-html coc-git coc-docker -# :qa! -#EOF +HOME=${DEST} vim -V -E -s /tmp/tempdir <<-EOF + :source ${DEST}/.vimrc + :call coc#util#install() + :CocStart + :CocInstall coc-java coc-go coc-python coc-flutter coc-css coc-cssmodules coc-xml coc-json coc-yaml coc-html coc-git coc-docker + :qa! +EOF -# Add platformio support to Coc +# Add platformio support to Coc. See: https://github.com/MaskRay/ccls/wiki/coc.nvim https://github.com/neoclide/coc.nvim/blob/101175f47c15ff11eb599c617ef895f578f758b8/doc/coc.txt +# Configuration is stored at: +# `$HOME/.vim/coc-settings.json` or +# `$HOME/.config/nvim/coc-settings.json` by default) +# or the /etc/skel equivalent which we can edit with jq + +sudo apt-get install -y ccls jq # :CocConfig #{ # "ccls": { # "enable": false, # "command": "ccls", -# "filetypes": ["c", "cpp", "objc", "objcpp"], +# "filetypes": ["c", "cpp", "cuda", "objc", "objcpp"], # "rootPatterns": [".ccls", "compile_commands.json", ".vim/", ".git/", ".hg/"], # "initializationOptions": { -# "cache": { -# "directory": "/tmp/ccls" -# } +# "cache": { +# "directory": "/tmp/ccls" +# }, +# "client": { +# "snippetSupport": true +# } # } # } -# } #} # Install YouCompleteMe support diff --git a/020_zsh_aliases.d.sh b/020_zsh_aliases.d.sh index 6dc296a..8fda0fc 100755 --- a/020_zsh_aliases.d.sh +++ b/020_zsh_aliases.d.sh @@ -134,6 +134,10 @@ alias shred='ionice -c3 /usr/bin/shred -fuzv' alias wipe='ionice -c3 /usr/bin/wipe -l1 -v -r' alias less="less -R" alias youtube-dl='youtube-dl --external-downloader=aria2c' +alias tsmpv='torsocks mpv' +alias tsyoutube-dl='torsocks youtube-dl' +alias tsleech='torsocks leech' +alias tswget='torsocks wget' EOF ALIAS_FILE=${DEST}/.zsh_aliases.d/003_lsd.sh diff --git a/build_deb_from_dsc.sh b/build_deb_from_dsc.sh index 50bc5e7..cd51a76 100755 --- a/build_deb_from_dsc.sh +++ b/build_deb_from_dsc.sh @@ -6,13 +6,12 @@ DSC_FILE=$2 apt install -y git-buildpackage equivs if [ "$1" == "-h" ]; then - echo "Usage: `basename $0` Takes a build location and a dsc file - or a url to one and builds and installs the result." + echo "Usage: `basename $0` Takes a dsc url and builds and installs the result." exit 0 fi -FILESTAMP=`date '+%Y-%m-%d-%H-%M'`-`uuidgen -t` -BUILD_DIR=${BUILDDIR}/build-${FILESTAMPS} +FILESTAMP=$(date '+%Y-%m-%d-%H-%M')-$(uuidgen -t) +BUILD_DIR=${BUILDDIR}/build-${FILESTAMP} echo "Building in ${BUILD_DIR}" mkdir -p ${BUILD_DIR} diff --git a/docker_daemon-writer.sh b/docker_daemon-writer.sh index 62b453f..57a4960 100644 --- a/docker_daemon-writer.sh +++ b/docker_daemon-writer.sh @@ -70,7 +70,7 @@ DOCKER_OPT[64]='.["runtimes"] = {"cc-runtime": {"path": "/usr/bin/cc-runtime"}," DOCKER_OPT[65]='.["default-addresses-pools"] = [{"base":"172.80.0.0/16","size":24},{"base":"172.90.0.0/16","size":24}]' JSON_FILE="daemon.json" -WORDIR="/tmp" +WORKDIR="/tmp" if [ ! -f ${WORKDIR}/${JSON_FILE} ] then