Cleanup before push.

This commit is contained in:
Cyteen May 2020-02-15 13:12:13 +00:00
parent 6a077c5b3e
commit fe66394cdc
12 changed files with 108 additions and 56 deletions

View File

@ -5,8 +5,8 @@ kill -9 `ps aux | grep -v grep | grep start-pulseaudio | awk {'print $2'}`
kill -9 `ps aux | grep -v grep | grep pulseaudio | awk {'print $2'}` kill -9 `ps aux | grep -v grep | grep pulseaudio | awk {'print $2'}`
bash -c "rm /etc/asound.conf" bash -c "rm /etc/asound.conf"
rm ~/.pulse-cookie rm $HOME/.pulse-cookie
rm -r ~/.config/pulse rm -r $HOME/.config/pulse
rm -rf /tmp/pulse* rm -rf /tmp/pulse*
apt-get -y install alsa-tools alsa-tools-gui alsa-utils alsa-oss alsamixergui volumeicon-alsa libalsaplayer0 apt-get -y install alsa-tools alsa-tools-gui alsa-utils alsa-oss alsamixergui volumeicon-alsa libalsaplayer0
@ -15,7 +15,7 @@ apt-get -y install pnmixer
/etc/init.d/alsa-utils restart /etc/init.d/alsa-utils restart
kill -HUP `ps aux | grep -v grep | grep pnmixer | awk {'print $2'}` kill -HUP `ps aux | grep -v grep | grep pnmixer | awk {'print $2'}`
sed -i 's,^\(VolumeControlCommand=\).*,\1'xfce4-mixer',' ~/.config/pnmixer/config sed -i 's,^\(VolumeControlCommand=\).*,\1'xfce4-mixer',' $HOME/.config/pnmixer/config
pnmixer & pnmixer &
cat > /etc/udev/rules.d/00_alsa-usb.rules << 'EOF' cat > /etc/udev/rules.d/00_alsa-usb.rules << 'EOF'

7
010_generate-ssh.sh Executable file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
# System keys
ssh-keygen -A
# Root user keys
ssh-keygen -q -t rsa -N '' -f ~/.ssh/id_rsa 2>/dev/null <<< y >/dev/null

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -x set -x
sudo apt-get install \ sudo apt-get -y install \
dh-autoreconf \ dh-autoreconf \
dh-make \ dh-make \
check \ check \
@ -28,25 +28,31 @@ sudo apt-get install \
USER=Arkq USER=Arkq
PROJECT=bluez-alsa PROJECT=bluez-alsa
LICENSE=mit LICENSE=mit
SECTION=admin
HOMEPAGE=http://www.bluez.org
BUILD_HOME=/var/tmp/bluez-alsa-git_build BUILD_HOME=/var/tmp/bluez-alsa-git_build
VERSION=2.1.0 #VERSION=2.1.0
#VERSION=$(curl "https://api.github.com/repos/${PROJECT}/tags?per_page=5" | jq -r '.[0] | .name') PACKAGE=bluealsa
VERSION=$(curl "https://api.github.com/repos/${USER}/${PROJECT}/tags?per_page=5" | jq -r '.[0] | .name')
VERSION=${VERSION:1} # strip the preceding 'v'
DEBEMAIL="person@company.tld" DEBEMAIL="person@company.tld"
DEBFULLNAME="Testy McTester" DEBFULLNAME="Testy McTester"
DESCRIPTION="Integration between BlueZ and ALSA."
LONG_DESCRIPTION=" With BlueALSA one can achieve the same goal as with PulseAudio, but with fewer\n dependencies and less overhead. BlueALSA registers all known Bluetooth audio\n profiles in BlueZ, so in theory every Bluetooth audio device can be connected.\n In order to access the audio stream, one has to connect to the ALSA PCM device\n called bluealsa."
# Disable discoverable timeout # Disable discoverable timeout in the main.conf from the bluez package
sed -i 's,^\(DiscoverableTimeout =\).*,\1'\"0"',' /etc/default/bluetooth/main.conf sed -i 's,^\(DiscoverableTimeout = \).*,\1'\"0\"',' /etc/bluetooth/main.conf
# Make the BUILD_HOME directory and clone upstream
mkdir -p ${BUILD_HOME} mkdir -p ${BUILD_HOME}
cd ${BUILD_HOME} cd ${BUILD_HOME}
git clone https://github.com/${USER}/${PROJECT}.git git clone https://github.com/${USER}/${PROJECT}.git ${PACKAGE}-${VERSION}
cd ${PACKAGE}-${VERSION}
mkdir -p m4
mv bluez-alsa bluez-alsa-git-${VERSION}
cd bluez-alsa-git-${VERSION}
pwd
ls -lh
cat <<EOF > .git/gbp.conf cat <<EOF > .git/gbp.conf
[DEFAULT] [DEFAULT]
@ -54,21 +60,39 @@ cat <<EOF > .git/gbp.conf
upstream-branch=master upstream-branch=master
EOF EOF
# debianize the BUILD_HOME directory
echo ${DEBFULLNAME}
dh_make \ dh_make \
--createorig \ --createorig \
--single \ --single \
--native \ --native \
--copyright ${LICENSE} \ --copyright ${LICENSE} \
--packagename ${PROJECT}-git \
--yes --yes
# Customize the debian directory values
#sed -i 's,^\(Description: \).*,\1'${DESCRIPTION}',' debian/control
sed -i "s,^\(Description: \).*,\1${DESCRIPTION}," debian/control
sed -i 's,^\(Section: \).*,\1'${SECTION}',' debian/control
sed -i "s,^\(Maintainer: \).*,\1'${DEBFULLNAME}\ \<${DEBEMAIL}\>'," debian/control
sed -i 's,^\(Homepage: \).*,\1'${HOMEPAGE}',' debian/control
sed -i "s/.*insert\ long.*/${LONG_DESCRIPTION}/" debian/control
echo ****************
cat debian/control
echo ****************
BUILD_OPTIONS="--enable-aac --enable-ofono --enable-debug" BUILD_OPTIONS="--enable-aac --enable-ofono --enable-debug"
cat <<EOF > debian/rules cat <<EOF > debian/rules
#!/usr/bin/make -f
%: %:
dh \$@ dh \$@
override_dh_auto_configure: override_dh_auto_configure:
dh_auto_configure -- ${BUILD_OPTIONS} dh_auto_configure -- ${BUILD_OPTIONS}
EOF EOF
cat <<EOF > debian/watch cat <<EOF > debian/watch
@ -77,9 +101,13 @@ opts=filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/${PROJECT}-$1\.tar\.gz/ \
https://github.com/${USER}/${PROJECT}/tags .*/v?(\d\S+)\.tar\.gz https://github.com/${USER}/${PROJECT}/tags .*/v?(\d\S+)\.tar\.gz
EOF EOF
pwd
dpkg-buildpackage -us -uc -b dpkg-buildpackage -us -uc -b
sudo dpkg -i ../bluez-alsa-git_2.1.0_amd64.deb
echo ${PACKAGE}_${VERSION}_amd64.deb
sudo dpkg -i ../${PACKAGE}_${VERSION}_amd64.deb
#-------------------------------------------------------------------------------
## When BlueALSA has been created, then you can start BlueALSA as background task: ## When BlueALSA has been created, then you can start BlueALSA as background task:
#bluealsa --disable-hfp & #bluealsa --disable-hfp &

View File

@ -34,7 +34,7 @@ deb https://packagecloud.io/github/git-lfs/${OS}/ ${DIST} main
deb-src https://packagecloud.io/github/git-lfs/${OS}/ ${DIST} main deb-src https://packagecloud.io/github/git-lfs/${OS}/ ${DIST} main
EOF EOF
ln -sf ${DEST}/git-lfs.list ${LINK}/git-lfs.list ln -sfr ${DEST}/git-lfs.list ${LINK}/git-lfs.list
gpg_key_url="https://packagecloud.io/github/git-lfs/gpgkey" gpg_key_url="https://packagecloud.io/github/git-lfs/gpgkey"

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
apt-get -y install hexchat apt-get -y install hexchat
mkdir -p ~/.config/hexchat mkdir -p $HOME/.config/hexchat
cat > ~/.config/hexchat/chanopt.conf <<'EOF' cat > $HOME/.config/hexchat/chanopt.conf <<'EOF'
network = freenode network = freenode
channel = #devuan channel = #devuan
text_hidejoinpart = 1 text_hidejoinpart = 1
@ -20,8 +20,8 @@ text_hidejoinpart = 1
EOF EOF
mkdir -p ~/.config/hexchat/ mkdir -p $HOME/.config/hexchat/
cat > ~/.config/hexchat/servlist.conf << 'EOF' cat > $HOME/.config/hexchat/servlist.conf << 'EOF'
v=2.10.1 v=2.10.1
N=2600net N=2600net
@ -744,7 +744,7 @@ S=irc.xertion.org/+6697
S=irc.xertion.org S=irc.xertion.org
EOF EOF
cat > ~/.config/hexchat/hexchat.conf <<'EOF' cat > $HOME/.config/hexchat/hexchat.conf <<'EOF'
version = 2.10.1 version = 2.10.1
away_auto_unmark = 0 away_auto_unmark = 0
away_omit_alerts = 0 away_omit_alerts = 0
@ -762,7 +762,7 @@ dcc_auto_recv = 1
dcc_auto_resume = 1 dcc_auto_resume = 1
dcc_blocksize = 1024 dcc_blocksize = 1024
dcc_completed_dir = dcc_completed_dir =
dcc_dir = ~/Downloads dcc_dir = $HOME/Downloads
dcc_fast_send = 1 dcc_fast_send = 1
dcc_global_max_get_cps = 0 dcc_global_max_get_cps = 0
dcc_global_max_send_cps = 0 dcc_global_max_send_cps = 0
@ -957,6 +957,6 @@ url_grabber_limit = 100
url_logging = 0 url_logging = 0
EOF EOF
#bash -c `perl -p -i -e 's/irc_conf_mode =.""/irc_conf_mode = "1"/g' ~/.xchat2/xchat.conf` #bash -c `perl -p -i -e 's/irc_conf_mode =.""/irc_conf_mode = "1"/g' $HOME/.xchat2/xchat.conf`
#bash -c `perl -p -i -e 's/irc_conf_mode =.""/irc_conf_mode = "1"/g' ~/.config/hexchat/h/xchat.conf` #bash -c `perl -p -i -e 's/irc_conf_mode =.""/irc_conf_mode = "1"/g' $HOME/.config/hexchat/h/xchat.conf`
perl -p -i -e 's/irc_conf_mode =.""/irc_conf_mode = "1"/g' ~/.config/hexchat/hexchat.conf perl -p -i -e 's/irc_conf_mode =.""/irc_conf_mode = "1"/g' $HOME/.config/hexchat/hexchat.conf

0
020_mutt-notmuch-afew.sh Normal file → Executable file
View File

View File

@ -1,3 +1,4 @@
#!/usr/bin/env bash
#FIXME: Install notmuch mail indexer for mutt NOT TESTED YET #FIXME: Install notmuch mail indexer for mutt NOT TESTED YET
# NB the following macro is already in mutt-wizard.muttrc # NB the following macro is already in mutt-wizard.muttrc

View File

@ -12,14 +12,14 @@ apt-get install -y #python-neovim python3-neovim
#ln -s ~/.vim ~/.config/nvim #ln -sfr ~/.vim ~/.config/nvim
mkdir -p ~/.config/nvim mkdir -p ~/.config/nvim
mkdir -p ~/.config/nvim/bundle mkdir -p ~/.config/nvim/bundle
mkdir -p ~/.config/nvim/colors mkdir -p ~/.config/nvim/colors
git clone https://github.com/VundleVim/Vundle.vim.git ~/.config/nvim/bundle/Vundle.vim git clone https://github.com/VundleVim/Vundle.vim.git ~/.config/nvim/bundle/Vundle.vim
# https://github.com/Netherdrake/Dotfiles/blob/master/config/nvim/init.vim # https://github.com/Netherdrake/Dotfiles/blob/master/config/nvim/init.vim
#ln -s ~/.vimrc ~/.config/nvim/init.vim #ln -sfr ~/.vimrc ~/.config/nvim/init.vim
# wget -c --directory-prefix ~/.config/nvim https://raw.githubusercontent.com/Netherdrake/Dotfiles/master/config/nvim/init.vim # wget -c --directory-prefix ~/.config/nvim https://raw.githubusercontent.com/Netherdrake/Dotfiles/master/config/nvim/init.vim
cat > ~/.config/nvim/init.vim << 'EOF' cat > ~/.config/nvim/init.vim << 'EOF'

View File

@ -7,14 +7,14 @@ sed -i -e 's/"set background=dark/set background=dark/' /etc/vim/vimrc
# Macros # Macros
# Format json # Format json
cat > ~/.vimrc << 'EOF' cat > $HOME/.vimrc << 'EOF'
" Format json " Format json
nmap =j :%!python -m json.tool<CR> nmap =j :%!python -m json.tool<CR>
EOF EOF
# vimrc additions # vimrc additions
cat > ~/.vimrc << 'EOF' cat > $HOME/.vimrc << 'EOF'
" enable syntax highlighting " enable syntax highlighting
syntax enable syntax enable
@ -83,7 +83,7 @@ endif
EOF EOF
# Xresources-hybrid-reduced-contrast # Xresources-hybrid-reduced-contrast
cat > ~/.Xresources << 'EOF' cat > $HOME/.Xresources << 'EOF'
! Hybrid Terminal Colours. Uses the palette from Tomorrow-Night: ! Hybrid Terminal Colours. Uses the palette from Tomorrow-Night:
! https://github.com/chriskempson/tomorrow-theme/blob/master/vim/colors/Tomorrow-Night.vim ! https://github.com/chriskempson/tomorrow-theme/blob/master/vim/colors/Tomorrow-Night.vim
! and the reduced contrast background color from Codecademy's online editor: ! and the reduced contrast background color from Codecademy's online editor:
@ -118,16 +118,16 @@ cat > ~/.Xresources << 'EOF'
*color15: #C5C8C6 *color15: #C5C8C6
EOF EOF
cd ~ || exit cd $HOME || exit
apt-get install -y git apt-get install -y git
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim git clone https://github.com/VundleVim/Vundle.vim.git $HOME/.vim/bundle/Vundle.vim
# Prepend to the .vimrc # Prepend to the .vimrc
rm ~/.vimrc_pending rm $HOME/.vimrc_pending
touch ~/.vimrc_pending touch $HOME/.vimrc_pending
cat > ~/.vimrc_pending << 'EOF' cat > $HOME/.vimrc_pending << 'EOF'
set nocompatible " be iMproved, required set nocompatible " be iMproved, required
filetype off " required filetype off " required
@ -136,10 +136,10 @@ set relativenumber
set number set number
" set the runtime path to include Vundle and initialize " set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim set rtp+=$HOME/.vim/bundle/Vundle.vim
call vundle#begin() call vundle#begin()
" alternatively, pass a path where Vundle should install plugins " alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here') "call vundle#begin('$HOME/some/path/here')
" let Vundle manage Vundle, required " let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim' Plugin 'VundleVim/Vundle.vim'
@ -343,16 +343,16 @@ au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/lib
EOF EOF
cat ~/.vimrc_pending cat $HOME/.vimrc_pending
# append the existing vimrc to the plugin additions # append the existing vimrc to the plugin additions
cat ~/.vimrc >> ~/.vimrc_pending cat $HOME/.vimrc >> $HOME/.vimrc_pending
# copy it back to the vimrc # copy it back to the vimrc
cp ~/.vimrc_pending ~/.vimrc cp $HOME/.vimrc_pending $HOME/.vimrc
#mv ~/.vimrc_pending ~/.vimrc #mv $HOME/.vimrc_pending $HOME/.vimrc
cat ~/.vimrc cat $HOME/.vimrc
vim +PluginInstall +qall vim +PluginInstall +qall
# Install YouCompleteMe support # Install YouCompleteMe support
@ -360,16 +360,16 @@ apt-get install -y build-essential cmake exuberant-ctags
apt-get install -y python-dev python3-dev apt-get install -y python-dev python3-dev
# semantic support for C-family # semantic support for C-family
#cd ~/.vim/bundle/YouCompleteMe/ && ./install.py --clang-completer #cd $HOME/.vim/bundle/YouCompleteMe/ && ./install.py --clang-completer
# Python should work automatically # Python should work automatically
#cd ~/.vim/bundle/YouCompleteMe/ && ./install.py #cd $HOME/.vim/bundle/YouCompleteMe/ && ./install.py
# Go support - # Go support -
#cd ~/.vim/bundle/YouCompleteMe/ && ./install.py --gocode-code --clang-completer #cd $HOME/.vim/bundle/YouCompleteMe/ && ./install.py --gocode-code --clang-completer
# ycmd update # ycmd update
#cd ~/.vim/bundle/YouCompleteMe/third_party/ycmd && git submodule update --init --recursive \ #cd $HOME/.vim/bundle/YouCompleteMe/third_party/ycmd && git submodule update --init --recursive \
#./build.py --all #./build.py --all
# jedi-vim (since youcompleteme seems to just crash) # jedi-vim (since youcompleteme seems to just crash)

View File

@ -9,7 +9,7 @@ apt-get install mbuffer
#cd znapzend-${ZZ_VERSION} #cd znapzend-${ZZ_VERSION}
#./configure --prefix=/opt/znapzend-${ZZ_VERSION} #./configure --prefix=/opt/znapzend-${ZZ_VERSION}
#make #make
#checkinstall --fstrans=no bash -c 'make install && for x in /opt/znapzend-0.17.0/bin/*; do ln -s $x /usr/local/bin; done' #checkinstall --fstrans=no bash -c 'make install && for x in /opt/znapzend-0.17.0/bin/*; do ln -sf $x /usr/local/bin; done'
# rm -rf znapzend-${ZZ_VERSION} # rm -rf znapzend-${ZZ_VERSION}

View File

@ -30,11 +30,11 @@ git clone http://github.com/tarjoilija/zgen # available with apt-get install zge
mkdir -p ~/.zgen/robbyrussell/ mkdir -p ~/.zgen/robbyrussell/
git clone http://github.com/ohmyzsh/ohmyzsh ~/.zgen/robbyrussell/ohmyzsh git clone http://github.com/ohmyzsh/ohmyzsh ~/.zgen/robbyrussell/ohmyzsh
#ln -sf ~/zsh-quickstart-kit/zsh/.zshrc ~/.zshrc #ln -sfr ~/zsh-quickstart-kit/zsh/.zshrc ~/.zshrc
#ln -sf ~/zsh-quickstart-kit/zsh/.zsh_functions ~/.zsh_functions #ln -sfr ~/zsh-quickstart-kit/zsh/.zsh_functions ~/.zsh_functions
#ln -sf ~/zsh-quickstart-kit/zsh/.zsh_aliases ~/.zsh_aliases #ln -sfr ~/zsh-quickstart-kit/zsh/.zsh_aliases ~/.zsh_aliases
#ln -sf ~/zsh-quickstart-kit/zsh/.zgen-setup ~/.zgen-setup #ln -sfr ~/zsh-quickstart-kit/zsh/.zgen-setup ~/.zgen-setup
#ln -sf ~/zsh-quickstart-kit/zsh/.zsh_completions ~/.zsh-completions #ln -sfr ~/zsh-quickstart-kit/zsh/.zsh_completions ~/.zsh-completions
mkdir -p ~/.zshrc.d mkdir -p ~/.zshrc.d
echo "setopt PROMPT_SUBST" >> ~/.zshrc echo "setopt PROMPT_SUBST" >> ~/.zshrc
@ -43,6 +43,20 @@ echo "NVIM_PYTHON_LOG_FILE=/var/tmp/nvim_python.log" >> ~/.zshrc.d/008_nvim.zsh
echo "NVIM_PYTHON_LOG_LEVEL=DEBUG" >> ~/.zshrc.d/008_nvim.zsh echo "NVIM_PYTHON_LOG_LEVEL=DEBUG" >> ~/.zshrc.d/008_nvim.zsh
touch /var/tmp/nvim_python.log touch /var/tmp/nvim_python.log
# Fix for using urls on the commandline
cat >> ~/.zshrc.d/005-url-quote-magic.zsh <<EOF
autoload -U url-quote-magic
zle -N self-insert url-quote-magic
autoload -Uz bracketed-paste-magic
zle -N bracketed-paste bracketed-paste-magic
# sort it out for SCP
some_remote_commands=(scp rsync)
zstyle -e :urlglobber url-other-schema \
'[[ $some_remote_commands[(i)$words[1]] -le ${#some_remote_commands} ]] && reply=("*") || reply=(http https ftp)'
EOF
# fix path error in .zshrc # fix path error in .zshrc
#sed -i 's|pushd $(dirname "${HOME}/$(readlink ~/.zshrc)")|pushd $(dirname "$(readlink ~/.zshrc)")|' ~/zsh-quickstart-kit/zsh/.zshrc #sed -i 's|pushd $(dirname "${HOME}/$(readlink ~/.zshrc)")|pushd $(dirname "$(readlink ~/.zshrc)")|' ~/zsh-quickstart-kit/zsh/.zshrc
@ -125,6 +139,7 @@ cat > ~/.zgen-local-plugins << 'EOF'
zgen oh-my-zsh plugins/rsync zgen oh-my-zsh plugins/rsync
zgen oh-my-zsh plugins/tmux zgen oh-my-zsh plugins/tmux
zgen oh-my-zsh plugins/screen zgen oh-my-zsh plugins/screen
zgen oh-my-zsh plugins/ssh-agent
zgen oh-my-zsh plugins/sudo zgen oh-my-zsh plugins/sudo
zgen oh-my-zsh plugins/vagrant zgen oh-my-zsh plugins/vagrant

View File

@ -125,6 +125,7 @@ cat > ~/.zgen-local-plugins << 'EOF'
zgen oh-my-zsh plugins/rsync zgen oh-my-zsh plugins/rsync
zgen oh-my-zsh plugins/tmux zgen oh-my-zsh plugins/tmux
zgen oh-my-zsh plugins/screen zgen oh-my-zsh plugins/screen
zgen oh-my-zsh plugins/ssh-agent
zgen oh-my-zsh plugins/sudo zgen oh-my-zsh plugins/sudo
zgen oh-my-zsh plugins/vagrant zgen oh-my-zsh plugins/vagrant