mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 20:08:15 +08:00
Use xcopy, mot mklink in link.bat; No an error if directory does not exist in unlink.bat
This commit is contained in:
+13
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
rem tools/link.bat
|
||||
rem
|
||||
rem Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
||||
rem Copyright (C) 2012, 2014 Gregory Nutt. All rights reserved.
|
||||
rem Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
rem
|
||||
rem Redistribution and use in source and binary forms, with or without
|
||||
@@ -33,6 +33,12 @@ rem ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
rem POSSIBILITY OF SUCH DAMAGE.
|
||||
rem
|
||||
|
||||
set usemklink=
|
||||
if "%1"=="-m" (
|
||||
set usemklink="y"
|
||||
shift
|
||||
)
|
||||
|
||||
set src=%1
|
||||
set link=%2
|
||||
|
||||
@@ -77,8 +83,14 @@ rem Copy the directory
|
||||
|
||||
:MkLink
|
||||
|
||||
if "%usemklink%"=="y" (
|
||||
/user:administrator mklink /d %src% %link%
|
||||
goto :End
|
||||
)
|
||||
|
||||
xcopy %src% %link% /c /q /s /e /y /i
|
||||
echo FAKELNK > include\apps\.fakelnk
|
||||
goto :End
|
||||
|
||||
:ShowUsage
|
||||
echo USAGE: %0 ^<src^> ^<link^>
|
||||
|
||||
Reference in New Issue
Block a user