Skip to content

Instantly share code, notes, and snippets.

@beyondlimits
Last active November 22, 2018 22:06
Show Gist options
  • Save beyondlimits/653ff42f4d78862e3a202ec2db6a8cdf to your computer and use it in GitHub Desktop.
Save beyondlimits/653ff42f4d78862e3a202ec2db6a8cdf to your computer and use it in GitHub Desktop.
group=thewild
gid=1000
user=thewild
uid=1000
fullname=TheWild
device=/dev/sdc1
mountpoint=/home/thewild
aptpackages="$mountpoint/apt/packages"
aptinstall="$mountpoint/apt/install"
f() while ! "$@"; do sleep 1; done
g(){ f sudo "$@";}
g blockdev --setro /dev/sd*
h(){ f gsettings set org.gnome.desktop.media-handling "$@" false;}
h automount
h automount-open
g sysctl -w kernel.sysrq=1
echo Please enter the SD card.
f [ -b "$device" ]
g fsck "$device"
g mkdir "$mountpoint"
g mount "$device" "$mountpoint"
g blockdev --setro /dev/sd*
g groupadd -g "$gid" "$group"
g useradd -g "$gid" -u "$uid" -c "$fullname" "$user"
g usermod -aG sudo "$user"
g passwd "$user"
h(){ g apt-add-repository "$@";}
h universe
h ppa:ondrej/php
h ppa:deadsnakes/ppa
h(){ g apt "$@";}
h purge -y xul-ext-ubufox
h update
h install -y "$aptpackages"/*
h install -y `grep -o '^[^#]*' "$aptinstall" | xargs`
h autoremove -y
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment