#!/bin/sh set -e erp() { printf 'ERR: %s\n' "$@" >&2 exit 1 } msg() { printf '=> %s\n' "$@" >&2 } if [ "$(id -u)" != "0" ]; then erp "must be run as root!" fi if [ -e "/opt/rypp" ]; then chmod 1777 /opt chmod 1777 /opt/rypp erp '/opt/rypp - exists (still made mode 1777 though...; give your users some fighting grounds - tmpfs-style)' fi mkdir -p /opt/rypp chmod 1777 /opt chmod 1777 /opt/rypp msg '/opt + ./rypp on mode 1777, give your users some fighting grounds... tmpfs-style' msg 'please do as a normal user: $ cp -r ./pkgs/ylil/bin /opt/rypp/bin'