#!/usr/local/bin/perl # # $Header: createsusetempfolder.pl 26-oct-2006.06:18:42 ssdas Exp $ # # createsusetempfolder.pl # # Copyright (c) 2005, 2006, Oracle. All rights reserved. # # NAME # createsusetempfolder.pl - # # DESCRIPTION # # # NOTES # # # MODIFIED (MM/DD/YY) # ssdas 10/26/06 - changing the ownership of the directory # ssdas 08/09/06 - # gaurgupt 07/17/06 - Creation # my $temp_folder=$ARGV[0]; my $rpms_folder=$ARGV[1]; my $username=$ARGV[3]; my $pathSeperator="/"; my $exitstatus; mkdir $temp_folder; my $rpms_path=$temp_folder.$pathSeperator.$rpms_folder; my $create_rpm_cmd="mkdir -p $rpms_path"; system($create_rpm_cmd); $exitstatus = $? >> 8; if ($exitstatus == 0) { $command="chown -R $username $temp_folder"; system($command); exit ($? >> 8); } exit $exitstatus;