diff options
author | dmcmahill <dmcmahill> | 2001-07-09 10:24:41 +0000 |
---|---|---|
committer | dmcmahill <dmcmahill> | 2001-07-09 10:24:41 +0000 |
commit | 990495d84ac7288dee253c793752dd4494f90ee1 (patch) | |
tree | fdd055edbac580caedba7d31d1033c745a710a43 /mk/bulk | |
parent | 3abe59ef448ca15feb4551cf23ed19afb97703ff (diff) | |
download | pkgsrc-990495d84ac7288dee253c793752dd4494f90ee1.tar.gz |
consolidate a duplicated part of the script.
Diffstat (limited to 'mk/bulk')
-rw-r--r-- | mk/bulk/upload | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/mk/bulk/upload b/mk/bulk/upload index 74c57bf90e5..26774257dd6 100644 --- a/mk/bulk/upload +++ b/mk/bulk/upload @@ -39,6 +39,7 @@ mkdir $TMP exf=$TMP/exclude osf=$TMP/osversion_specific +upload=$TMP/upload upload_specific=$TMP/upload_specific upload_others=$TMP/upload_others @@ -65,12 +66,17 @@ RSFLAGS="-vap --progress $RSYNC_OPTS" failed=no cd $packages +echo "#!/bin/sh" > $upload +echo "packages=$packages" >> $upload +echo "if ! cd $packages ; then" >> $upload +echo " echo \"could not cd to $packages\"" >> $upload +echo " exit 1" >> $upload +echo "fi" >> $upload + echo "Uploading OSVERSION_SPECIFIC pkgs" cmd="rsync $RSFLAGS --include '*/' --exclude-from=$exf --include-from=$osf \ --exclude '*' . $RSYNC_DST_SPECIFIC" -echo "#!/bin/sh" > $upload_specific -echo "packages=$packages" >> $upload_specific -echo "cd $packages || (echo \"could not cd to $packages\" ; exit 1)" >> $upload_specific +cp -f $upload $upload_specific echo $cmd >> $upload_specific chmod 755 $upload_specific echo $cmd @@ -87,9 +93,7 @@ fi echo "Uploading non-OSVERSION_SPECIFIC pkgs" cmd="rsync $RSFLAGS --exclude-from=$exf --exclude-from=$osf . $RSYNC_DST_OTHER" -echo "#!/bin/sh" > $upload_others -echo "packages=$packages" >> $upload_others -echo "cd $packages || (echo \"could not cd to $packages\" ; exit 1)" >> $upload_others +cp -f $upload $upload_others echo $cmd >> $upload_others chmod 755 $upload_others echo $cmd |