linux-image-manager/scripts/data/export-to-system.sh

13 lines
639 B
Bash
Raw Permalink Normal View History

2019-09-30 15:29:28 +02:00
#!/bin/bash
2019-09-30 16:13:26 +02:00
# Executes the import script in reverse mode
# @author Kevin Veen-Birkenbach [aka. Frantz]
2019-10-01 12:30:27 +02:00
# shellcheck source=/dev/null # Deactivate SC1090
2020-06-12 11:41:08 +02:00
# shellcheck disable=SC2015 # Deactivating bool hint
2020-05-02 12:39:00 +02:00
source "$(dirname "$(readlink -f "${0}")")/../base.sh" || (echo "Loading base.sh failed." && exit 1)
bash "$SCRIPT_PATH""data/import-from-system.sh" reverse
2020-06-12 11:41:08 +02:00
info "Setting right permissions for importet files..." &&
chmod -R 700 ~/.ssh &&
chmod 600 ~/.ssh/id_rsa &&
2020-06-24 09:31:57 +02:00
chmod 600 ~/.ssh/id_rsa.pub || error "Failed to set correct ssh permissions"
chown -R "$USER":"$USER" ~ || warning "Not all files could be owned by user \"$USER\"..."