Skip to content

Instantly share code, notes, and snippets.

@supersexy
Forked from wolkenarchitekt/Makefile
Created August 14, 2019 13:01
Show Gist options
  • Save supersexy/bba138e2d50e25f1e14958085839f771 to your computer and use it in GitHub Desktop.
Save supersexy/bba138e2d50e25f1e14958085839f771 to your computer and use it in GitHub Desktop.
Makefile config management
.DEFAULT_GOAL := all
SHELL := /bin/bash
PWD = $(shell pwd)
UNAME := $(shell uname)
ARCH := $(shell uname -m)
USER := $(shell echo $$USER)
USERDIR := $(shell echo $$HOME)
# Synology ignores
ifeq ($(UNAME),Linux)
FOLDER := .SynologyDrive/SynologyDrive.app/conf
else ifeq ($(UNAME),Darwin)
FOLDER := .SynologyDrive/SynologyDrive.app/Contents/Resources/conf
endif
SYNOLOGY_SRC := $(PWD)/files/home/user/$(FOLDER)
SYNOLOGY_TARGET := $(USERDIR)/$(FOLDER)
# Window move:
# https://extensions.gnome.org/extension/39/put-windows/
test:
echo $(USERDIR)
upgrade:
DEBIAN_FRONTEND=noninteractive sudo apt-get update && sudo apt-get -y -o DPkg::options::="--force-confdef" -o DPkg::options::="--force-confold" upgrade
#sudo DEBIAN_FRONTEND=noninteractive apt-get -y -o DPkg::options::="--force-confdef" -o DPkg::options::="--force-confold" install grub-pc
#sudo DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade
packages:
@sudo apt-get update
@echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
@DEBIAN_FRONTEND=noninteractive sudo apt-get -y install \
ansible \
clementine \
clipit \
entr \
fasd \
fdupes \
gimp \
git \
gparted \
git-gui \
jmtpfs \
ipython3 \
htop \
jq \
libxml2-utils \
meld \
keepassx \
libglib2.0-bin \
nfs-common \
openssh-server \
python3-pip \
silversearcher-ag \
soundkonverter \
terminator \
torbrowser-launcher \
ubuntu-restricted-extras \
vagrant \
vim \
vlc \
zlib1g-dev \
ntfs-3g hfsutils hfsprogs exfat-fuse \
mpv \
python-mutagen \
python3-ipdb \
python3-mutagen \
python-watchdog
@sudo pip3 install \
cookiecutter \
virtualenv \
isort \
autoflake
hibiscus:
@sudo add-apt-repository ppa:marko-preuss/hibiscus
@sudo apt-get install hibiscus
latex:
@sudo apt-get -y install \
texlive \
texlive-fonts-extra \
texlive-science \
texlive-lang-german \
texmaker
@sudo cp files/usr/share/applications/texmaker.desktop /usr/share/applications/texmaker.desktop
@sudo chown -R $(USER) /usr/share/applications/texmaker.desktop
ack:
sudo apt-get install -y ack
ln -sf $(PWD)/files/home/user/.ackrc $(USERDIR)/.ackrc
fzf:
@if [ ! -d "$(USERDIR)/.fzf" ] ; then \
git clone --depth 1 https://github.com/junegunn/fzf.git $(USERDIR)/.fzf; \
$(USERDIR)/.fzf/install --completion --key-bindings --no-update-rc; \
fi
bash:
mkdir -p $(USERDIR)/.config
# sudo chown -R $(USER) $(USERDIR)/.config
@if ! [ -L "$(USERDIR)/.bashrc" ]; then \
ln -sf $(PWD)/files/home/user/.bashrc $(USERDIR)/.bashrc; \
fi
@if ! [ -L "$(USERDIR)/.config/bashrc" ]; then \
ln -sf $(PWD)/files/home/user/.config/bashrc $(USERDIR)/.config/bashrc; \
ln -sf $(PWD)/files/home/user/.bashrc $(USERDIR)/.bashrc; \
fi
organize_imports:
@sudo pip3 install \
isort \
autoflake
@sudo cp $(PWD)/files/usr/local/bin/organize_imports /usr/local/bin/organize_imports
synology_ignore:
cp -v $(SYNOLOGY_SRC)/filter $(SYNOLOGY_TARGET)/
cp -v $(SYNOLOGY_SRC)/filter-v4150 $(SYNOLOGY_TARGET)/
pyenv:
# Make precise repo in /etc/apt/sources.list trusted by adding [trusted=yes]
@sudo apt-get -y install \
make \
build-essential \
encfs \
libssl-dev \
zlib1g-dev \
libbz2-dev \
libreadline-dev \
libsqlite3-dev \
wget \
curl \
llvm \
xz-utils \
libffi-dev \
liblzma-dev \
python-openssl \
zlib-devel \
bzip2-devel \
sqlite \
sqlite-devel \
openssl-devel
@if [ ! -d "$(USERDIR)/.pyenv" ] ; then \
git clone https://github.com/pyenv/pyenv.git $(USERDIR)/.pyenv; \
fi
@if [ ! -d "$(USERDIR)/.pyenv/plugins/pyenv-virtualenvwrapper" ] ; then \
git clone https://github.com/yyuu/pyenv-virtualenvwrapper.git $(USERDIR)/.pyenv/plugins/pyenv-virtualenvwrapper; \
fi
@if [ ! -d "$(USERDIR)/.pyenv/plugins/pyenv-virtualenv" ] ; then \
git clone https://github.com/pyenv/pyenv-virtualenv.git $(USERDIR)/.pyenv/plugins/pyenv-virtualenv; \
fi
conficloudstation:
xdg-open https://www.synology.com/en-uk/support/download/DS216j#utilities
@read -p "Press any key after installation is finished"
powerbutton-shutoff:
hostnamectl set-chassis vm
-gsettings set org.gnome.settings-daemon.plugins.power button-power shutdown
entr:
sudo cp $(PWD)/files/reload-browser /usr/local/bin/reload-browser
sudo chmod +x /usr/local/bin/reload-browser
wrk:
sudo apt-get install build-essential libssl-dev git -y
cd $(PWD)/files/wrk
sudo make
sudo cp wrk /usr/local/bin
go:
sudo snap install go --classic
node:
curl -sL https://deb.nodesource.com/setup_10.x | sudo bash
#curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash -
sudo apt -y install nodejs
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install -y yarn
rust:
curl https://sh.rustup.rs -sSf | sh -s -- -y
mount:
./config.sh fstab
virtualbox:
sudo apt-get install -y virtualbox virtualbox-qt virtualbox-dkms
docker:
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt update
sudo apt install -y docker-ce
# sudo systemctl status docker
sudo usermod -aG docker ${USER}
# su - ${USER}
sudo curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$$(uname -s)-$$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
keyboard:
sudo cp /usr/share/X11/xkb/symbols/gb /usr/share/X11/xkb/symbols/gb.bak
sudo cp files/usr/share/X11/xkb/symbols/gb /usr/share/X11/xkb/symbols/gb
/usr/bin/setxkbmap gb -display :0
quicktile:
sudo apt install -y libpango1.0-0 pip
# used https://pkgs.org to find python-wnck
wget http://ftp.br.debian.org/debian/pool/main/g/gnome-python-desktop/python-wnck_2.32.0+dfsg-3_amd64.deb
sudo dpkg -i python-wnck_2.32.0+dfsg-3_amd64.deb
sudo -H pip2 install https://github.com/ssokolow/quicktile/archive/master.zip
all: packages ack fzf bash entr wrk go mount docker latex organize_imports node rust virtualbox # upgrade powerbutton-shutoff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment