file.c (379) | file.c (383) |
---|---|
1#ifndef lint 2static const char *rcsid = "$Id: file.c,v 1.6 1993/09/04 05:06:48 jkh Exp $"; 3#endif 4 5/* 6 * FreeBSD install - a package for the installation and maintainance 7 * of non-core utilities. 8 * --- 121 unchanged lines hidden (view full) --- 130 if (!to) { 131 /* If absolute path, use it */ 132 if (*fname == '/') 133 dir = "/"; 134 sprintf(cmd, "tar cf - -C %s %s | tar xpf -", dir, fname); 135 } 136 else 137 sprintf(cmd, "tar cf - %s | tar xpf - -C %s", fname, dir); | 1#ifndef lint 2static const char *rcsid = "$Id: file.c,v 1.6 1993/09/04 05:06:48 jkh Exp $"; 3#endif 4 5/* 6 * FreeBSD install - a package for the installation and maintainance 7 * of non-core utilities. 8 * --- 121 unchanged lines hidden (view full) --- 130 if (!to) { 131 /* If absolute path, use it */ 132 if (*fname == '/') 133 dir = "/"; 134 sprintf(cmd, "tar cf - -C %s %s | tar xpf -", dir, fname); 135 } 136 else 137 sprintf(cmd, "tar cf - %s | tar xpf - -C %s", fname, dir); |
138#ifdef DEBUG 139 printf("Using '%s' to copy trees.\n", cmd); 140#endif |
|
138 if (system(cmd)) 139 barf("copy_file: Couldn't perform '%s'", cmd); 140} 141 142/* Unpack a tar file */ 143int 144unpack(char *pkg, char *flist) 145{ --- 19 unchanged lines hidden --- | 141 if (system(cmd)) 142 barf("copy_file: Couldn't perform '%s'", cmd); 143} 144 145/* Unpack a tar file */ 146int 147unpack(char *pkg, char *flist) 148{ --- 19 unchanged lines hidden --- |