From: Simon Ruderich Date: Sun, 3 Jun 2018 16:16:53 +0000 (+0200) Subject: os: remove old scripts X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=7e0091dd9b0fe43ba8d078772d82174d861faed0;p=config%2Fdotfiles.git os: remove old scripts --- diff --git a/os/debian/bin/backup.sh b/os/debian/bin/backup.sh deleted file mode 100755 index 4b9bffa..0000000 --- a/os/debian/bin/backup.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -# Backup all important system-relevant data of a Debian system. -# -# The list of installed packages can be extracted from /var/lib/dpkg/status. - -# Copyright (C) 2013 Simon Ruderich -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - - -set -eu - -# tar can't exclude it automatically because we pipe it through gpg. -target="`pwd`/`hostname`.tar.gpg" - -tar cf - \ - --exclude /root/apt \ - --exclude /var/cache \ - --exclude /var/www \ - --exclude "$target" \ - --exclude "$target.tmp" \ - /etc /root /var \ - | gpg --encrypt --sign --recipient 0x95AC608FB0863F79 \ - >"$target.tmp" -mv "$target.tmp" "$target" diff --git a/os/debian/bin/init-reprepro.sh b/os/debian/bin/init-reprepro.sh deleted file mode 100755 index 4014dc4..0000000 --- a/os/debian/bin/init-reprepro.sh +++ /dev/null @@ -1,90 +0,0 @@ -# Setup a reprepro repository in /root/apt and add it to -# /etc/apt/sources.list. - -# Copyright (C) 2013 Simon Ruderich -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - - -set -eu - -sources=/etc/apt/sources.list -repo=/root/apt - -# Don't look for exact "file://$repo" match to allow modifications on the -# system. -if grep -E '^deb file:///' "$sources" >/dev/null 2>&1; then - echo "file:/// already present in '$sources'!" >&2 - exit 1 -fi - -# Create signing key for the repository if necessary. -email="apt@`hostname`" -if ! gpg --list-keys "$email" >/dev/null 2>&1; then - # See doc/DETAILS in the gpg source tree for documentation. - gpg --gen-key --batch </dev/null \ - || grep -E '^deb' "$sources" | head -n1 | awk '{ print $3 }'` - -# Create reprepro repository. -if test ! -d "$repo"; then - echo "creating reprepro repository in '$repo'" >&2 - mkdir -p "$repo/conf" - mkdir -p "$repo/morgue" - - arch="`dpkg --print-architecture` `dpkg --print-foreign-architectures`" - cat >"$repo/conf/distributions" <"$repo/conf/options" <&2 - ( cd "$repo" && reprepro export ) || true - - # Does nothing if the same key is imported multiple times. - echo 'Adding key with apt-key.' >&2 - gpg --export "$keyid" | apt-key add - -fi - -echo "deb file://$repo $codename main" >>"$sources" - -echo 'Finished successfully'. >&2