Skip to content

Instantly share code, notes, and snippets.

@dtrunk90
dtrunk90 / instructions.md
Last active October 21, 2021 12:45
Ubuntu: Powerline + Trueline Full Setup
  1. Install powerline + powerline-gitstatus using sudo apt install -y powerline powerline-gitstatus
  2. Download the correct NerdFont (the one your Terminal uses; e.g. UbuntuMono) from https://www.nerdfonts.com/font-downloads and extract to ~/.local/share/fonts
  3. Rebuild font cache using fc-cache -fv
  4. Get trueline script using wget https://raw.githubusercontent.com/petobens/trueline/master/trueline.sh -P ~/
  5. Append to ~/.bashrc:
# Powerline configuration
if [ -f /usr/share/powerline/bindings/bash/powerline.sh ]; then
  powerline-daemon -q
POWERLINE_BASH_CONTINUATION=1
@dtrunk90
dtrunk90 / list-identical-blobs.sh
Last active September 28, 2022 18:11
Can be executed within android root dir for finding identical proprietary files
#!/bin/bash
vendor="sony"
devices=("akari" "akatsuki" "aurora" "xz2c")
cmp_all() {
for device in "${devices[@]:1}"; do
if ! cmp -s "vendor/$vendor/${devices[0]}/$1" "vendor/$vendor/$device/$1"; then
return 1
fi
done
@dtrunk90
dtrunk90 / move-identical-blobs.sh
Created August 25, 2022 13:49
Can be executed within android root dir for moving found identical proprietary files
#!/bin/bash
vendor="sony"
devices=("akari" "akatsuki" "aurora" "xz2c")
common_device="tama-common"
device_devices=(${devices[@]/#/device/${vendor}/})
common_proprietary_files_file="device/${vendor}/${common_device}/proprietary-files.txt"
vendor_devices=(${devices[@]/#/vendor/${vendor}/})
# loop through identical blobs
while IFS= read -r file; do