mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 02:57:38 +00:00
Bug 468575 - Scrape some gunk off the config/ grout, r=ted
This commit is contained in:
parent
4953c244b0
commit
3c22ccc1e8
@ -55,7 +55,7 @@ HOST_CSRCS = nsinstall.c pathsub.c
|
||||
endif
|
||||
endif
|
||||
|
||||
PLSRCS = nfspwd.pl revdepth.pl
|
||||
PLSRCS = nfspwd.pl
|
||||
|
||||
TARGETS = $(HOST_PROGRAM) $(PLSRCS:.pl=) $(SIMPLE_PROGRAMS)
|
||||
|
||||
|
133
config/bin2rc.c
133
config/bin2rc.c
@ -1,133 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
#include <stdio.h>
|
||||
#include <sys\stat.h>
|
||||
|
||||
int main(int iArgc, char **ppArgv) {
|
||||
int iRetval = 1;
|
||||
|
||||
/* First argument, the filename to convert.
|
||||
* Output to stdout, redirect to save.
|
||||
*/
|
||||
char *pFileName = ppArgv[1];
|
||||
if(pFileName) {
|
||||
FILE *pFile = fopen(pFileName, "rb");
|
||||
if(pFile) {
|
||||
struct stat sInfo;
|
||||
|
||||
/* Stat the file for size.
|
||||
*/
|
||||
if(!fstat(fileno(pFile), &sInfo)) {
|
||||
int iChar;
|
||||
int iX = 0;
|
||||
int iFirsttime = 1;
|
||||
|
||||
/* Begin RCDATA
|
||||
*/
|
||||
printf("BEGIN\n");
|
||||
|
||||
/* First string identifies created via bin2rc.
|
||||
* Users of the RCDATA must check for this to
|
||||
* assume the format of the remainder of
|
||||
* the data.
|
||||
*/
|
||||
printf("\t\"bin2rc generated resource\\0\",\t// bin2rc identity string\n");
|
||||
|
||||
/* Next string is optional parameter on command
|
||||
* line. If not present, an empty string.
|
||||
* Users of the RCDATA must understand this is
|
||||
* the optional string that can be used for
|
||||
* about any purpose they desire.
|
||||
*/
|
||||
printf("\t\"%s\\0\",\t// optional command line string\n", ppArgv[2] ? ppArgv[2] : "");
|
||||
|
||||
/* Next string is the size of the original file.
|
||||
* Users of the RCDATA must understand that this
|
||||
* is the size of the file's actual contents.
|
||||
*/
|
||||
printf("\t\"%ld\\0\"\t// data size header\n", sInfo.st_size);
|
||||
|
||||
while(EOF != (iChar = fgetc(pFile))) {
|
||||
/* Comma?
|
||||
*/
|
||||
if(0 == iFirsttime) {
|
||||
iX += printf(",");
|
||||
}
|
||||
else {
|
||||
iFirsttime = 0;
|
||||
}
|
||||
|
||||
/* Newline?
|
||||
*/
|
||||
if(iX >= 72) {
|
||||
printf("\n");
|
||||
iX = 0;
|
||||
}
|
||||
|
||||
/* Tab?
|
||||
*/
|
||||
if(0 == iX) {
|
||||
printf("\t");
|
||||
iX += 8;
|
||||
}
|
||||
|
||||
/* Octal byte.
|
||||
*/
|
||||
iX += printf("\"\\%.3o\"", iChar);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* End RCDATA
|
||||
*/
|
||||
if(0 != iX) {
|
||||
printf("\n");
|
||||
}
|
||||
printf("END\n");
|
||||
|
||||
/* All is well.
|
||||
*/
|
||||
iRetval = 0;
|
||||
}
|
||||
fclose(pFile);
|
||||
pFile = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return(iRetval);
|
||||
}
|
||||
|
Binary file not shown.
@ -1,12 +0,0 @@
|
||||
open INFILE, "<$ARGV[1]";
|
||||
$build = <INFILE>;
|
||||
close INFILE;
|
||||
chop $build;
|
||||
open OUTFILE, ">$ARGV[0]" || die;
|
||||
|
||||
print OUTFILE "/* THIS IS A GENERATED FILE!\n*\n";
|
||||
print OUTFILE "* See mozilla/config/build_header.pl */\n*\n*/";
|
||||
print OUTFILE "\n\#define NS_BUILD_ID " . $build . "\n";
|
||||
|
||||
close OUTFILE;
|
||||
|
@ -1,142 +0,0 @@
|
||||
#!perl5
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#
|
||||
# Searches the tree for unclobbered files
|
||||
# should be relatively cross platform
|
||||
#
|
||||
|
||||
$start_dir = $ENV{"MOZ_SRC"};
|
||||
@ignore_list = ("make.dep","manifest.mnw");
|
||||
|
||||
$missed = 0;
|
||||
|
||||
print "\n\nChecking for unclobbered files\n" .
|
||||
"------------------------------\n";
|
||||
|
||||
GoDir("ns");
|
||||
GoDir("mozilla");
|
||||
|
||||
if( $missed ){
|
||||
die "\nError: $missed files or directories unclobbered\n";
|
||||
}
|
||||
else {
|
||||
print "No unclobbered files found\n";
|
||||
}
|
||||
|
||||
sub GoDir {
|
||||
local($dir) = @_;
|
||||
local(%filelist,$iscvsdir);
|
||||
local($k,$v,$d,$fn,$rev, $mod_time);
|
||||
local($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
|
||||
$atime,$mtime,$ctime,$blksize,$blocks);
|
||||
|
||||
if(! chdir "$start_dir/$dir" ){
|
||||
return;
|
||||
}
|
||||
|
||||
while(<*.*> ){
|
||||
if( $_ ne '.' && $_ ne '..' && $_ ne 'CVS'
|
||||
&& $_ ne 'nuke' ){
|
||||
$filelist{$_} = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if( -r "CVS/Entries" ){
|
||||
$iscvsdir=1;
|
||||
open(ENT, "CVS/Entries" ) ||
|
||||
die "Cannot open CVS/Entries for reading\n";
|
||||
while(<ENT>){
|
||||
chop;
|
||||
($d,$fn,$rev,$mod_time) = split(/\//);
|
||||
|
||||
if( $fn ne "" ){
|
||||
if( $d eq "D" ){
|
||||
$filelist{$fn} = 3;
|
||||
}
|
||||
else {
|
||||
$filelist{$fn} = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
close(ENT);
|
||||
}
|
||||
|
||||
while( ($k,$v) = each %filelist ){
|
||||
if( $v == 1 && $iscvsdir && !IgnoreFile( $k ) ){
|
||||
if( ! -d $k ){
|
||||
print " file: $dir/$k\n";
|
||||
$missed++;
|
||||
}
|
||||
else {
|
||||
if( ! -r "$k/CVS/Entries" ){
|
||||
print "directory: $dir/$k\n";
|
||||
$missed++;
|
||||
}
|
||||
else {
|
||||
$filelist{$k} = 3;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
while( ($k,$v) = each %filelist ){
|
||||
if( $v == 3 ){
|
||||
GoDir("$dir/$k");
|
||||
}
|
||||
}
|
||||
|
||||
# while( ($k,$v) = each %filelist ){
|
||||
# print "$k: $v\n";
|
||||
# }
|
||||
|
||||
}
|
||||
|
||||
sub IgnoreFile {
|
||||
local($fn) = @_;
|
||||
local($i);
|
||||
|
||||
for $i (@ignore_list){
|
||||
if( $fn eq $i ){
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
157
config/common.mk
157
config/common.mk
@ -1,157 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
INCLUDED_COMMON_MK = 1
|
||||
|
||||
######################################################################
|
||||
# Cross-platform defines used on all platforms (in theory)
|
||||
######################################################################
|
||||
|
||||
#
|
||||
# The VERSION_NUMBER is suffixed onto the end of the DLLs we ship.
|
||||
# Since the longest of these is 5 characters without the suffix,
|
||||
# be sure to not set VERSION_NUMBER to anything longer than 3
|
||||
# characters for Win16's sake.
|
||||
#
|
||||
# Also... If you change this value, there are several other places
|
||||
# you'll need to change (because they're not reached by this
|
||||
# variable):
|
||||
# sun-java/nsjava/nsjava32.def
|
||||
# sun-java/nsjava/nsjava16.def
|
||||
# sun-java/classsrc/sun/audio/AudioDevice.java
|
||||
# sun-java/classsrc/sun/awt/windows/WToolkit.java
|
||||
#
|
||||
VERSION_NUMBER = 50
|
||||
|
||||
# jar for core java classes:
|
||||
JAR_NAME = java$(VERSION_NUMBER).jar
|
||||
|
||||
# jar for navigator-specific java code:
|
||||
NAV_JAR_NAME = nav$(VERSION_NUMBER).jar
|
||||
|
||||
######################################################################
|
||||
# Cross-Platform Java Stuff
|
||||
######################################################################
|
||||
# java interpreter
|
||||
|
||||
# get class files from the directory they are compiled to
|
||||
JAVA_CLASSPATH = $(JAVAC_ZIP)$(PATH_SEPARATOR)$(JAVA_DESTPATH)
|
||||
|
||||
JAVA_FLAGS = -classpath $(JAVA_CLASSPATH) -ms8m
|
||||
JAVA = $(JAVA_PROG) $(JAVA_FLAGS)
|
||||
|
||||
#
|
||||
# NOTE: If a new DLL is being added to this define you will have to update
|
||||
# ns/sun-java/include/javadefs.h in order not to break win16.
|
||||
#
|
||||
JAVA_DEFINES = -DJAR_NAME=\"$(JAR_NAME)\" -DJRTDLL=\"$(JRTDLL)\" -DMMDLL=\"$(MMDLL)\" \
|
||||
-DAWTDLL=\"$(AWTDLL)\" -DJITDLL=\"$(JITDLL)\" -DJPWDLL=\"$(JPWDLL)\"
|
||||
|
||||
######################################################################
|
||||
# javac
|
||||
|
||||
#
|
||||
# java wants '-ms8m' and kaffe wants '-ms 8m', so this needs to be
|
||||
# overridable.
|
||||
#
|
||||
JINT_FLAGS = -ms8m
|
||||
|
||||
# to run the compiler in the interpreter
|
||||
JAVAC_PROG = $(JINT_FLAGS) $(PDJAVA_FLAGS) -classpath $(JAVAC_ZIP) sun.tools.javac.Main
|
||||
JAVAC = $(JAVA_PROG) $(JAVAC_PROG) $(JAVAC_FLAGS)
|
||||
|
||||
# std set of options passed to the compiler
|
||||
JAVAC_FLAGS = -classpath $(JAVAC_CLASSPATH) $(JAVAC_OPTIMIZER) -d $(JAVA_DESTPATH)
|
||||
|
||||
#
|
||||
# The canonical Java classpath is:
|
||||
# JAVA_DESTPATH, JAVA_SOURCEPATH, JAVA_LIBS
|
||||
#
|
||||
# appropriately delimited, in that order
|
||||
#
|
||||
JAVAC_CLASSPATH = $(JAVAC_ZIP)$(PATH_SEPARATOR)$(JAVA_DESTPATH)$(PATH_SEPARATOR)$(JAVA_SOURCEPATH)
|
||||
|
||||
######################################################################
|
||||
# javadoc
|
||||
|
||||
# Rules to build java .html files from java source files
|
||||
|
||||
JAVADOC_PROG = $(JAVA) sun.tools.javadoc.Main
|
||||
JAVADOC_FLAGS = -classpath $(JAVAC_CLASSPATH)
|
||||
JAVADOC = $(JAVADOC_PROG) $(JAVADOC_FLAGS)
|
||||
|
||||
######################################################################
|
||||
# javah
|
||||
|
||||
JAVAH_FLAGS = -classpath $(JAVAC_ZIP)$(PATH_SEPARATOR)$(JAVA_DESTPATH)
|
||||
JAVAH = $(JAVAH_PROG) $(JAVAH_FLAGS)
|
||||
|
||||
######################################################################
|
||||
# jmc
|
||||
|
||||
JMCSRCDIR = $(DIST)/_jmc
|
||||
JMC_PROG = $(JAVA) netscape.tools.jmc.Main
|
||||
JMC_CLASSPATH = $(JMCSRCDIR)$(PATH_SEPARATOR)$(JAVAC_CLASSPATH)
|
||||
JMC_FLAGS = -classpath $(JMC_CLASSPATH) -verbose
|
||||
JMC = $(JMC_PROG) $(JMC_FLAGS)
|
||||
|
||||
######################################################################
|
||||
# zip
|
||||
|
||||
ZIP = $(ZIP_PROG) $(ZIP_FLAGS)
|
||||
|
||||
######################################################################
|
||||
# idl2java
|
||||
|
||||
ORBTOOLS = $(DEPTH)/modules/iiop/tools/orbtools.zip
|
||||
ORB_CLASSPATH = $(ORBTOOLS)$(PATH_SEPARATOR)$(JAVA_CLASSPATH)
|
||||
|
||||
IDL2JAVA_PROG = $(JAVA_PROG)
|
||||
IDL2JAVA_FLAGS = -classpath $(ORB_CLASSPATH) pomoco.tools.idl2java
|
||||
IDL2JAVA = $(IDL2JAVA_PROG) $(IDL2JAVA_FLAGS)
|
||||
|
||||
######################################################################
|
||||
# lex and yacc
|
||||
|
||||
JAVALEX_PROG = $(JAVA_PROG) -classpath $(ORB_CLASSPATH) sbktech.tools.jax.driver
|
||||
JAVALEX_FLAGS =
|
||||
JAVALEX = $(JAVALEX_PROG) $(JAVALEX_FLAGS)
|
||||
|
||||
JAVACUP_PROG = $(JAVA_PROG) -classpath $(ORB_CLASSPATH) java_cup.Main
|
||||
JAVACUP_FLAGS =
|
||||
JAVACUP = $(JAVACUP_PROG) $(JAVACUP_FLAGS)
|
||||
|
@ -1,62 +0,0 @@
|
||||
#! perl
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#
|
||||
# Print out the nodltab.
|
||||
# Usage: nodl.pl table-name sym1 sym2 ... symN
|
||||
#
|
||||
|
||||
$table = $ARGV[0];
|
||||
shift(@ARGV);
|
||||
|
||||
print "/* Automatically generated file; do not edit */\n\n";
|
||||
|
||||
print "#include \"prtypes.h\"\n\n";
|
||||
print "#include \"prlink.h\"\n\n";
|
||||
|
||||
foreach $symbol (@ARGV) {
|
||||
print "extern void ",$symbol,"();\n";
|
||||
}
|
||||
print "\n";
|
||||
|
||||
print "PRStaticLinkTable ",$table,"[] = {\n";
|
||||
foreach $symbol (@ARGV) {
|
||||
print " { \"",$symbol,"\", ",$symbol," },\n";
|
||||
}
|
||||
print " { 0, 0, },\n";
|
||||
print "};\n";
|
@ -1,23 +0,0 @@
|
||||
#ifndef _NSBUILDID_H_
|
||||
#define _NSBUILDID_H_
|
||||
/* Build ID file.
|
||||
*
|
||||
* If building MOZILLLA_OFFICIAL (release build) NS_BUILD_ID will be updated
|
||||
* to a current build id. This will be used to determine if we need to
|
||||
* re-register components.
|
||||
*
|
||||
*/
|
||||
#define NS_BUILD_ID 0000000000
|
||||
|
||||
/* GRE_BUILD_ID - GRE build version identifier
|
||||
*
|
||||
* If creating a release build (eg, MOZILLA_OFFICIAL is set), then
|
||||
* GRE_BUILD_ID will be updated to contain <milestone>_<build id>.
|
||||
* If building a milestone build (eg, MOZ_MILESTONE_RELEASE is set), then
|
||||
* GRE_BUILD_ID will just contain <milestone>.
|
||||
*
|
||||
*/
|
||||
#define GRE_BUILD_ID "00000000000"
|
||||
|
||||
#endif /* _NSBUILDID_H_ */
|
||||
|
@ -1,47 +0,0 @@
|
||||
#!perl
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#
|
||||
# Transform package paths to depths:
|
||||
# foo/bar ==> ../..
|
||||
#
|
||||
|
||||
# Why don't we need .. here?
|
||||
$ARGV[0] =~ s@[^/\\]+@..@g;
|
||||
|
||||
print $ARGV[0]
|
@ -1,48 +0,0 @@
|
||||
#! perl
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
require "/ns/config/fastcwd.pl";
|
||||
|
||||
$cur = &fastcwd;
|
||||
chdir($ARGV[0]);
|
||||
$newcur = &fastcwd;
|
||||
$newcurlen = length($newcur);
|
||||
|
||||
# Skip common separating / unless $newcur is "/"
|
||||
$cur = substr($cur, $newcurlen + ($newcurlen > 1));
|
||||
print $cur;
|
@ -1,51 +0,0 @@
|
||||
#! perl
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
unshift(@INC, '/usr/lib/perl');
|
||||
unshift(@INC, '/usr/local/lib/perl');
|
||||
|
||||
require "fastcwd.pl";
|
||||
|
||||
$cur = &fastcwd;
|
||||
chdir($ARGV[0]);
|
||||
$newcur = &fastcwd;
|
||||
$newcurlen = length($newcur);
|
||||
|
||||
# Skip common separating / unless $newcur is "/"
|
||||
$cur = substr($cur, $newcurlen + ($newcurlen > 1));
|
||||
print $cur;
|
@ -1,40 +0,0 @@
|
||||
@echo off
|
||||
rem ***** BEGIN LICENSE BLOCK *****
|
||||
rem Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
rem
|
||||
rem The contents of this file are subject to the Mozilla Public License Version
|
||||
rem 1.1 (the "License"); you may not use this file except in compliance with
|
||||
rem the License. You may obtain a copy of the License at
|
||||
rem http://www.mozilla.org/MPL/
|
||||
rem
|
||||
rem Software distributed under the License is distributed on an "AS IS" basis,
|
||||
rem WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
rem for the specific language governing rights and limitations under the
|
||||
rem License.
|
||||
rem
|
||||
rem The Original Code is mozilla.org code.
|
||||
rem
|
||||
rem The Initial Developer of the Original Code is
|
||||
rem Netscape Communications Corporation.
|
||||
rem Portions created by the Initial Developer are Copyright (C) 1998
|
||||
rem the Initial Developer. All Rights Reserved.
|
||||
rem
|
||||
rem Contributor(s):
|
||||
rem
|
||||
rem Alternatively, the contents of this file may be used under the terms of
|
||||
rem either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
rem the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
rem in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
rem of those above. If you wish to allow use of your version of this file only
|
||||
rem under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
rem use your version of this file under the terms of the MPL, indicate your
|
||||
rem decision by deleting the provisions above and replace them with the notice
|
||||
rem and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
rem the provisions above, a recipient may use your version of this file under
|
||||
rem the terms of any one of the MPL, the GPL or the LGPL.
|
||||
rem
|
||||
rem ***** END LICENSE BLOCK ***** */
|
||||
|
||||
@echo on
|
||||
|
||||
@echo off
|
@ -1,223 +0,0 @@
|
||||
#!perl
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is Mozilla Communicator client code, released
|
||||
# March 31, 1998.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-1999
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Sean Su <ssu@netscape.com>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
use Cwd;
|
||||
return(1);
|
||||
|
||||
sub ZipChrome()
|
||||
{
|
||||
# inOsType - Os type
|
||||
# inUpdate - update or noupdate
|
||||
# update - enables time/date compare file update of chrome archives
|
||||
# noupdate - disables time/date compare file update of chrome archives.
|
||||
# it will always update chrome files regardless of time/date stamp.
|
||||
# inSourcePath - path to where the tmpchrome dir
|
||||
# inTargetPath - path to where the bin\chrome dir
|
||||
($inOsType, $inUpdate, $inSourcePath, $inTargetPath) = @_;
|
||||
|
||||
# check Os type
|
||||
if($inOsType =~ /win32/i)
|
||||
{
|
||||
$gPathDelimiter="\\";
|
||||
}
|
||||
elsif($inOsType =~ /mac/i)
|
||||
{
|
||||
$gPathDelimiter=":";
|
||||
}
|
||||
elsif($inOsType =~ /unix/i)
|
||||
{
|
||||
$gPathDelimiter="/";
|
||||
}
|
||||
else
|
||||
{
|
||||
return(2);
|
||||
}
|
||||
|
||||
# Verify Update
|
||||
if(!($inUpdate =~ /update/i) &&
|
||||
!($inUpdate =~ /noupdate/i))
|
||||
{
|
||||
return(2);
|
||||
}
|
||||
|
||||
if($inOsType =~ /win32/i)
|
||||
{
|
||||
# Convert all '/' to '\\' or else win32 will have problems
|
||||
$inSourcePath =~ s/\//\\/g;
|
||||
$inTargetPath =~ s/\//\\/g;
|
||||
}
|
||||
|
||||
# Make sure $inSourcePath exists
|
||||
if(!(-e "$inSourcePath"))
|
||||
{
|
||||
return(1);
|
||||
}
|
||||
|
||||
# Make sure $inTargetPath exists
|
||||
if(!(-e "$inTargetPath"))
|
||||
{
|
||||
mkdir("$inTargetPath", 0775);
|
||||
}
|
||||
|
||||
# Call CreateArchive() on locales, packages, and skins
|
||||
# CreateArchive("loc", $inSourcePath . $gPathDelimiter . "locales", "$inTargetPath");
|
||||
# CreateArchive("pkg", $inSourcePath . $gPathDelimiter . "packages", "$inTargetPath");
|
||||
# CreateArchive("skn", $inSourcePath . $gPathDelimiter . "skins", "$inTargetPath");
|
||||
CreateArchive("jar", $inSourcePath . $gPathDelimiter, "$inTargetPath");
|
||||
return(0);
|
||||
}
|
||||
|
||||
sub CreateArchive()
|
||||
{
|
||||
my($inExtension, $inSrc, $inDest) = @_;
|
||||
my($dir);
|
||||
my(@dirList);
|
||||
my(@dirItem);
|
||||
my($dirName);
|
||||
my($saveCwdir);
|
||||
my($mZipParam);
|
||||
|
||||
# Make sure $inSrc exists
|
||||
if(!(-e "$inSrc"))
|
||||
{
|
||||
return(0);
|
||||
}
|
||||
|
||||
# Make sure $inSrc is a directory
|
||||
if(!(-d "$inSrc"))
|
||||
{
|
||||
return(0);
|
||||
}
|
||||
|
||||
# Make sure $inDest exists
|
||||
if(!(-e "$inDest"))
|
||||
{
|
||||
mkdir("$inDest", 0775);
|
||||
}
|
||||
|
||||
# Check for extension, if none is passed, use .jar as default
|
||||
if($inExtension eq "")
|
||||
{
|
||||
$inExtension = "jar";
|
||||
}
|
||||
|
||||
# Save current working directory
|
||||
$saveCwdir = cwd();
|
||||
chdir($inSrc);
|
||||
|
||||
# For all the subdirectories within $inSrc, create an archive
|
||||
# using the name of the subdirectory, but with the extension passed
|
||||
# in as a parameter.
|
||||
@dirList = <*>;
|
||||
foreach $dir (@dirList)
|
||||
{
|
||||
if($inOsType =~ /win32/i)
|
||||
{
|
||||
# Convert all '/' to '\\' or else win32 will have problems
|
||||
$dir =~ s/\//\\/g;
|
||||
}
|
||||
|
||||
# Get the leaf dir name of full path
|
||||
# Get the leaf dir name from full path
|
||||
if($inOsType =~ /win32/i)
|
||||
{
|
||||
@dirItem = split(/\\/, $dir);
|
||||
}
|
||||
elsif($inOsType =~ /mac/i)
|
||||
{
|
||||
@dirItem = split(/:/, $dir);
|
||||
}
|
||||
elsif($inOsType =~ /unix/i)
|
||||
{
|
||||
@dirItem = split(/\//, $dir);
|
||||
}
|
||||
$dirName = $dirItem[$#dirItem];
|
||||
|
||||
if(-d "$dir")
|
||||
{
|
||||
# Zip only works for win32 and unix systems
|
||||
if(($inOsType =~ /win32/i) || ($inOsType =~ /unix/i))
|
||||
{
|
||||
if($inUpdate =~ /noupdate/i)
|
||||
{
|
||||
print "\n";
|
||||
if(-e "$dirName.$inExtension")
|
||||
{
|
||||
# Delete archive is one already exists in target location
|
||||
print " Removing $dirName.$inExtension\n";
|
||||
unlink "$dirName.$inExtension";
|
||||
}
|
||||
|
||||
print " Creating $dirName.$inExtension\n";
|
||||
$mZipParam = "";
|
||||
}
|
||||
elsif($inUpdate =~ /update/i)
|
||||
{
|
||||
if(!(-e "$dirName.$inExtension"))
|
||||
{
|
||||
print "\n";
|
||||
print " Creating $dirName.$inExtension\n";
|
||||
$mZipParam = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
print " Updating $dirName.$inExtension\n";
|
||||
$mZipParam = "-u";
|
||||
}
|
||||
}
|
||||
|
||||
# Create the archive in $inDest
|
||||
chdir("$dirName");
|
||||
if(system("zip $mZipParam -r ..$gPathDelimiter$dirName.$inExtension *") != 0)
|
||||
{
|
||||
print "Error: zip $mZipParam -r ..$gPathDelimiter$dirName.$inExtension *\n";
|
||||
chdir("..");
|
||||
return(1);
|
||||
}
|
||||
chdir("..");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Restore to the current working dir
|
||||
chdir($saveCwdir);
|
||||
return(0);
|
||||
}
|
||||
|
@ -1,88 +0,0 @@
|
||||
#!perl
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is Mozilla Communicator client code, released
|
||||
# March 31, 1998.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-1999
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Sean Su <ssu@netscape.com>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
# Make sure there are at least four arguments
|
||||
if(($#ARGV < 2) ||
|
||||
((!($ARGV[0] =~ /^win32$/i)) &&
|
||||
(!($ARGV[0] =~ /^mac$/i)) &&
|
||||
(!($ARGV[0] =~ /^unix$/i))) ||
|
||||
((!($ARGV[1] =~ /^update$/i)) &&
|
||||
(!($ARGV[1] =~ /^noupdate$/i))))
|
||||
{
|
||||
PrintUsage();
|
||||
exit(1);
|
||||
}
|
||||
|
||||
require "$ENV{MOZ_SRC}/mozilla/config/zipcfunc.pl";
|
||||
|
||||
if($#ARGV == 2)
|
||||
{
|
||||
if(&ZipChrome($ARGV[0], $ARGV[1], $ARGV[2], $ARGV[2]) != 0)
|
||||
{
|
||||
die "\n Error: ZipChrome($ARGV[0], $ARGV[1], $ARGV[2], $ARGV[2])\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(&ZipChrome($ARGV[0], $ARGV[1], $ARGV[2], $ARGV[3]) != 0)
|
||||
{
|
||||
die "\n Error: ZipChrome($ARGV[0], $ARGV[1], $ARGV[2], $ARGV[3])\n";
|
||||
}
|
||||
}
|
||||
exit(0);
|
||||
|
||||
sub PrintUsage()
|
||||
{
|
||||
print "usage: $0 <os> <update> <source path> [target path]
|
||||
|
||||
os : win32, mac, unix
|
||||
|
||||
update : update - enables time/date compare file update of chrome archives
|
||||
noupdate - disables time/date compare file update of chrome archives.
|
||||
it will always update chrome files regardless of time/date stamp.
|
||||
|
||||
source path : path to where the chrome dir is at
|
||||
|
||||
target path : (optional) path to where the chrome jar files should be copied to
|
||||
|
||||
ie: $0 update $ENV{MOZ_SRC}\\mozilla\\dist\\win32_d.obj\\tmpchrome $ENV{MOZ_SRC}\\mozilla\\dist\\win32_d.obj\\bin\\chrome
|
||||
\n";
|
||||
}
|
||||
|
@ -1,48 +0,0 @@
|
||||
#! perl
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
require "/ns/config/fastcwd.pl";
|
||||
|
||||
$cur = &fastcwd;
|
||||
chdir($ARGV[0]);
|
||||
$newcur = &fastcwd;
|
||||
$newcurlen = length($newcur);
|
||||
|
||||
# Skip common separating / unless $newcur is "/"
|
||||
$cur = substr($cur, $newcurlen + ($newcurlen > 1));
|
||||
print $cur;
|
@ -1,51 +0,0 @@
|
||||
#! perl
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
unshift(@INC, '/usr/lib/perl');
|
||||
unshift(@INC, '/usr/local/lib/perl');
|
||||
|
||||
require "fastcwd.pl";
|
||||
|
||||
$cur = &fastcwd;
|
||||
chdir($ARGV[0]);
|
||||
$newcur = &fastcwd;
|
||||
$newcurlen = length($newcur);
|
||||
|
||||
# Skip common separating / unless $newcur is "/"
|
||||
$cur = substr($cur, $newcurlen + ($newcurlen > 1));
|
||||
print $cur;
|
Loading…
Reference in New Issue
Block a user