File: tst_user.sh

package info (click to toggle)
oscar 1.5.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 27,500 kB
  • sloc: cpp: 80,911; ansic: 6,910; python: 1,727; sh: 1,044; xml: 150; javascript: 74; makefile: 34; awk: 18
file content (10 lines) | stat: -rwxr-xr-x 296 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
#! /bin/bash
set -e
#
#test USER (must be root) vs SUDO_USER (must be other than root but not empty)
if [ "$USER" != "root" ] || [ "$SUDO_USER" = "root" ] || [ -z "$SUDO_USER" ]; then
    echo "Installation must be done as normal user with sudo command. fatal error"
    exit
fi
#    do nothing