Skip to content

Commit

Permalink
make tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
swarfer committed Dec 16, 2022
1 parent fc1fbff commit eb51a98
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
8 changes: 5 additions & 3 deletions make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ REM goto spath

if exist "C:\Program Files (x86)\Google\Google SketchUp 8" cd "C:\Program Files (x86)\Google\Google SketchUp 8\Plugins"
if exist "C:\Program Files\Google\Google SketchUp 8\Plugins" cd "C:\Program Files\Google\Google SketchUp 8\Plugins"
cd
if exist Phlatboyz goto zipit
echo Phlatboyz not found
goto fail
Expand All @@ -68,13 +69,14 @@ REM goto spath
echo Zipit
cd
del tp.zip
"c:\program files\7-zip\7z" a tp.zip *.* -x@..\make.ex -r
"c:\program files\7-zip\7z" a ..\tp.zip *.* -x@..\make.ex -r
dir /s /b *.zip

rem del ..\sketchucam-1*.rbz
cd ..
REM subwcrev .\ phrev.txt phrev.dat // git does not support this
if exist plugins\tp.zip php move.php plugins\tp.zip SketchUcam-1_5c.rbz
if not exist plugins\tp.zip echo ERROR tp.zip not found
if not exist tp.zip echo ERROR tp.zip not found
if exist tp.zip php move.php tp.zip SketchUcam-1_5c.rbz

goto end

Expand Down
13 changes: 9 additions & 4 deletions move.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@
$rev = file('plugins\phrev.dat');
$rev = trim($rev[0]);

$src = $argv[1];
$src = str_replace('\\','/',$argv[1]);
$dest = preg_replace('/.rbz/',"-$rev.rbz",$argv[2]);
print "Moving $src to $dest\n ";

rename($argv[1] , $dest);
if (file_exists($src))
{
print "Moving $src to $dest\n ";
$cmd = "move \"$src\" \"$dest\"";
system($cmd);
}
else
print "source file $src not found for move\n";
?>

0 comments on commit eb51a98

Please sign in to comment.