Lines Matching refs:rpath

337 static int sync_send(int fd, const char *lpath, const char *rpath,
347 len = strlen(rpath);
357 writex(fd, rpath, len) || writex(fd, tmp, r)) {
393 fprintf(stderr,"failed to copy '%s' to '%s': %s\n", lpath, rpath, sbuf->data);
424 int sync_recv(int fd, const char *rpath, const char *lpath, int show_progress)
433 len = strlen(rpath);
443 writex(fd, rpath, len)) {
459 writex(fd, rpath, len)) {
503 fprintf(stderr,"cannot write '%s': %s\n", rpath, strerror(errno));
534 fprintf(stderr,"failed to copy '%s' to '%s': %s\n", rpath, lpath, buffer);
610 const char *lpath, const char *rpath)
618 // fprintf(stderr,"local_build_list('%s','%s')\n", lpath, rpath);
646 ci = mkcopyinfo(lpath, rpath, name, 1);
650 ci = mkcopyinfo(lpath, rpath, name, 0);
685 static int copy_local_dir_remote(int fd, const char *lpath, const char *rpath, int checktimestamps, int listonly)
692 if((lpath[0] == 0) || (rpath[0] == 0)) return -1;
700 if(rpath[strlen(rpath) - 1] != '/') {
701 int tmplen = strlen(rpath)+2;
704 snprintf(tmp, tmplen, "%s/",rpath);
705 rpath = tmp;
708 if(local_build_list(&filelist, lpath, rpath)) {
754 int do_sync_push(const char *lpath, const char *rpath, int show_progress)
774 if(copy_local_dir_remote(fd, lpath, rpath, 0, 0)) {
781 if(sync_readmode(fd, rpath, &mode)) {
794 int tmplen = strlen(name) + strlen(rpath) + 2;
795 char *tmp = malloc(strlen(name) + strlen(rpath) + 2);
797 snprintf(tmp, tmplen, "%s/%s", rpath, name);
798 rpath = tmp;
801 if(sync_send(fd, lpath, rpath, st.st_mtime, st.st_mode, show_progress)) {
817 const char *rpath;
837 ci = mkcopyinfo(args->rpath, args->lpath, name, 1);
843 ci = mkcopyinfo(args->rpath, args->lpath, name, 0);
855 const char *rpath, const char *lpath)
862 args.rpath = rpath;
865 /* Put the files/dirs in rpath on the lists. */
866 if (sync_ls(syncfd, rpath, sync_ls_build_list_cb, (void *)&args)) {
896 static int copy_remote_dir_local(int fd, const char *rpath, const char *lpath,
905 if (rpath[0] == 0 || lpath[0] == 0) return -1;
906 if (rpath[strlen(rpath) - 1] != '/') {
907 int tmplen = strlen(rpath) + 2;
910 snprintf(tmp, tmplen, "%s/", rpath);
911 rpath = tmp;
923 if (remote_build_list(fd, &filelist, rpath, lpath)) {
952 int do_sync_pull(const char *rpath, const char *lpath, int show_progress, int copy_attrs)
965 if(sync_readtime(fd, rpath, &time, &mode)) {
969 fprintf(stderr,"remote object '%s' does not exist\n", rpath);
979 const char *name = adb_dirstop(rpath);
981 name = rpath;
993 if (sync_recv(fd, rpath, lpath, show_progress)) {
1004 if (copy_remote_dir_local(fd, rpath, lpath, copy_attrs)) {
1012 fprintf(stderr,"remote object '%s' not a file or directory\n", rpath);
1017 int do_sync_sync(const char *lpath, const char *rpath, int listonly)
1019 fprintf(stderr,"syncing %s...\n",rpath);
1028 if(copy_local_dir_remote(fd, lpath, rpath, 1, listonly)){