Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pike
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
581648a5
Commit
581648a5
authored
12 years ago
by
Martin Nilsson
Browse files
Options
Downloads
Patches
Plain Diff
This looks quite obsolete.
parent
6e610b31
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
bin/README
+0
-4
0 additions, 4 deletions
bin/README
bin/parse_install_log
+0
-130
0 additions, 130 deletions
bin/parse_install_log
with
0 additions
and
134 deletions
bin/README
+
0
−
4
View file @
581648a5
...
...
@@ -57,10 +57,6 @@ nobinary_dummy
A simple script that fakes success for all configure
tests when --disable-binary is set.
parse_install_log
[FIXME: What does this do? Doesn't appear to be called
from any Makefile.]
pike
This file is generated from the file pike.in when make
all is built from the top level make file. This script
...
...
This diff is collapsed.
Click to expand it.
bin/parse_install_log
deleted
100644 → 0
+
0
−
130
View file @
6e610b31
#! /usr/bin/env pike
// -*- pike -*-
mapping install_from=([]);
mapping fake_dirs=([]);
void install(string from, string to)
{
if(search(from,"/CVS/")!=-1) return;
install_from[combine_path(".",to)]=combine_path(".",from);
}
int main(int argc, array(string) argv)
{
string srcdir=argv[1];
string prefix=argv[2];
array(string) lines=Stdio.stdin->read(0x7fffffff)/"\n";
foreach(lines, string line)
{
array(string) args=line/" ";
args[0]=basename(args[0]);
Getopt.find_all_options(args,
({
({"ignore",Getopt.NO_ARG,"-cvf"}),
}),
0,
0);
args=Getopt.get_args(args,0,0);
switch(args[0])
{
case "mkdir":
for(int e=1;e<sizeof(args);e++)
fake_dirs[args]=1;
break;
case "install":
case "cp":
mixed s=file_stat(args[-1]);
if((s && s[1]==-2) || sizeof(args)>3 || fake_dirs[s])
{
for(int e=1;e<sizeof(args)-1;e++)
install(args[e], combine_path(args[-1],basename(args[e])));
}else{
install(args[1], args[2]);
}
}
}
string dirname=replace(version()," ","-");
#if constant(uname)
mixed u=uname();
if(u->sysname=="AIX")
dirname+="-"+u->sysname+"-"+u->version+"."+u->release;
else
dirname+="-"+u->sysname+"-"+u->release+"-"+u->machine;
dirname=replace(dirname,"/","-");
#endif
Process.system("rm -rf "+dirname);
mkdir(dirname);
chmod(dirname,0755);
mkdir(dirname+"/files");
chmod(dirname+"/files",0755);
Process.system("cp "+
srcdir+"/install-sh "+
srcdir+"/COPYING "+
srcdir+"/COPYRIGHT "+
srcdir+"/DISCLAIMER "+
srcdir+"/../ANNOUNCE "+
dirname);
chmod(dirname+"/install-sh",0755);
mapping new_install_from=([]);
int fileno;
foreach(sort(indices(install_from)), mixed i)
{
Process.system("cp "+install_from[i]+" "+dirname+"/files/"+fileno);
new_install_from[i]="files/"+fileno;
fileno++;
}
string script="#!/bin/sh\n";
script+="cat <<\EOF\n";
script+=
"This script will install "+version()+" on this machine.\n"
"The following directories will be created if they do not\n"
"already exist:\n"
"\n"
" "+prefix+"/bin/\n"
" "+prefix+"/lib/pike/\n"
" "+prefix+"/include/pike/\n"
"\n"
"Do you wish to continue? \n"
"EOF\n"
"if read answer ; then\n"
" case x$answer in\n"
" xy* | xY*) ;;\n"
" *) echo See you later. ; exit 0\n"
" esac\n"
"else\n"
" :\n"
"fi\n"
;
foreach(sort(indices(new_install_from)), mixed i)
{
script+=
sprintf("echo installing %s\n",i)+
sprintf("if test -f %s ; then mv -f %s %s.old ; else : ; fi\n",i,i,i)+
sprintf("./install-sh %s %s\n",new_install_from[i],i);
}
rm(dirname+"/install");
Stdio.write_file(dirname+"/install",script);
chmod(dirname+"/install",0755);
Process.system("tar cvf - "+dirname+" | gzip -9 >"+dirname+".tar.gz");
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment