[go: up one dir, main page]

Menu

[r2]: / bin / ct-info  Maximize  Restore  History

Download this file

78 lines (64 with data), 1.4 kB

#!/bin/sh
## ctafinfo.sh for ctafconf in /ctaf/conf
##
## Made by root
## Login   <root@epita.fr>
##
## Started on  Fri Feb 18 16:13:08 2005 root
## Last update Thu Oct 13 22:15:00 2005 
##
##ORIGINALY FROM CTAFCONF

##
##PORVIDE USER INFO TO ALL CTAFCONF
##

if ! [ $# -eq 1 ]; then
  echo "usage: ctafinfo <login|name|group|wm";
  echo "                 |config|sudo|wallpaper|zprompt>";
  exit
fi

info_wanted=$1

if ! [ -f ~/.ctafconf/user-profile ]; then
  echo "Can't find your ~/.ctafconf/user_profile.ctafconf"
  echo "you should reinstall env with ctafconf-install"
  exit 1
fi
. ~/.ctafconf/user-profile

#UID
if [ "x$info_wanted" = "xlogin" ]; then
  echo $ctafconf_login
  exit 0
fi

#USERNAME
if [ "x$info_wanted" = "xname" ]; then
  echo $ctafconf_name
  exit 0
fi

#GID
if [ "x$info_wanted" = "xgroup" ]; then
  echo $ctafconf_group
  exit 0
fi

#WALLPAPER
if [ "x$info_wanted" = "xwallpaper" ]; then
  echo $ctafconf_wallpaper
  exit 0
fi

#TYPE OF CONFIG
if [ "x$info_wanted" = "xconfig" ]; then
  echo $ctafconf_config
  exit 0
fi

if [ "x$info_wanted" = "xsudo" ]; then
  echo $ctafconf_sudo
  exit 1
fi

if [ "x$info_wanted" = "xzprompt" ]; then
  echo $ctafconf_zprompt
  exit 1
fi

if [ "x$info_wanted" = "xwm" ]; then
  echo $ctafconf_wm
  exit 1
fi

echo "pleaze select a valid option: login|group|name|config|sudo|wallpaper|zprompt wm"
exit 2