aboutsummaryrefslogtreecommitdiffstats
path: root/create-file
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>2002-07-12 15:23:50 +0000
committerMystery Man <unknown@mandriva.org>2002-07-12 15:23:50 +0000
commite86b6a1e3b64bdf1f96c572f7a824b3dd74c71b8 (patch)
tree33a04fe5e4b674d437146992d11bb52dd20804ba /create-file
parentb570e96e55cab1c0d1ee546f1601939f190e9697 (diff)
downloadrpm-helper-0_3_1mdk.tar
rpm-helper-0_3_1mdk.tar.gz
rpm-helper-0_3_1mdk.tar.bz2
rpm-helper-0_3_1mdk.tar.xz
rpm-helper-0_3_1mdk.zip
This commit was manufactured by cvs2svn to create tag 'V0_3_1mdk'.V0_3_1mdk
Diffstat (limited to 'create-file')
-rwxr-xr-xcreate-file31
1 files changed, 31 insertions, 0 deletions
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 <pkg name> <num installed> <file> <owner> <group> <mode>" 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