#!/bin/bash set -e case $1 in preinst) exit 0 ;; postinst) if [[ ${TARGET} ]]; then if [ ! -f ${TARGET}/etc/bashrc ]; then install -m 0644 ${TARGET}/usr/share/snap-base/bashrc \ ${TARGET}/etc/bashrc fi if [ ! -f ${TARGET}/etc/group ]; then install -m 0644 ${TARGET}/usr/share/snap-base/group \ ${TARGET}/etc/group fi if [ ! -f ${TARGET}/etc/passwd ]; then install -m 0644 ${TARGET}/usr/share/snap-base/passwd \ ${TARGET}/etc/passwd fi if [ ! -f ${TARGET}/etc/profile ]; then install -m 0644 ${TARGET}/usr/share/snap-base/profile \ ${TARGET}/etc/profile fi if [ ! -f ${TARGET}/etc/snap.conf ]; then install -m 0644 ${TARGET}/usr/share/snap-base/snap.conf \ ${TARGET}/etc/snap.conf fi if [ ! -f ${TARGET}/etc/snap_version ]; then install -m 0644 ${TARGET}/usr/share/snap-base/snap_version \ ${TARGET}/etc/snap_version fi fi ;; prerm) exit 0 ;; postrm) exit 0 ;; esac