From 0e4c31fd92ec58c6ee4eefee53f03fe70efa8ff3 Mon Sep 17 00:00:00 2001 From: Frederic Lepied Date: Wed, 10 Jul 2002 13:08:49 +0000 Subject: first version --- create-file | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 create-file (limited to 'create-file') diff --git a/create-file b/create-file new file mode 100755 index 0000000..6dce7c1 --- /dev/null +++ b/create-file @@ -0,0 +1,31 @@ +#!/bin/sh +#--------------------------------------------------------------- +# Project : Mandrake Linux +# Module : rpm-helper +# File : create-file +# Version : $Id$ +# Author : Frederic Lepied +# Created On : Wed Jul 10 15:12:29 2002 +# Purpose : helper script for rpm scriptlets to create +# a non existent file. +#--------------------------------------------------------------- + +if [ $# != 6 ]; then + echo "usage: $0 " 1>&2 + exit 1 +fi + +pkg=$1 # name of the package +num=$2 # number of packages installed +file=$3 # filename +owner=$4 # owner of the file +group=$5 # group of the file +mode=$6 # mode of the file + +if [ ! -f $file ]; then + touch $file + chown $owner.$group $file + chmod $mode $file +fi + +# create-file ends here -- cgit v1.2.1