Browse Source

Initial commit.

master
Kolan Sh 5 years ago
commit
b5d67b8813
  1. 27
      ----lastinpath.bat
  2. 0
      Rar.exe
  3. 0
      UnRar.exe
  4. 17
      clearbuild.bat
  5. 28
      cleardir.bat
  6. 25
      cleardirs.bat
  7. 17
      delbkps.bat
  8. 25
      fibo_proc.bat
  9. 25
      fibonachi.bat
  10. 3
      format_c.bat
  11. 5
      format_cpp.bat
  12. 3
      getBCBtemplate.bat
  13. 0
      gzip.exe
  14. 16
      hide.bat
  15. 24
      lastparm.bat
  16. 18
      logrotate.conf.example
  17. 125
      logrotatew.bat
  18. 19
      makedirs.bat
  19. 32
      rardir.bat
  20. 25
      rardir_proc.bat
  21. 20
      rardirs.bat
  22. 8
      sync_any_hg.bat

27
----lastinpath.bat

@ -0,0 +1,27 @@
@echo off
rem ****************************
rem Ñöåíàðèé: lastinpath.bat
rem Äàòà ñîçäàíèÿ 7/15/2008
rem Ïîñëåäíåå èçìåíåíèå: 7/15/2008
rem Àâòîð: Øàøêèí Í. Ñ. kolan klmn
rem E-mail: xalava@bk.ru
rem ****************************
rem Îïèñàíèå: çàïóñê
rem call lastinpath VarName Ïóòü
rem Ïîìåùàåò èìÿ ïîñëå ïîñëåäíåãî
rem \ â ïóòè â ïåðåìåííóþ VarName.
rem Íàïðèìåð,
rem call lastinpath KDE c:\home\Ìàñÿíÿ\áóõàåì\äîìà
rem çàíåñ¸ò "áóõàåì" â KDE.
rem ****************************
rem Ôàéëû: òðåáóåò lastarg.bat
rem ****************************
:shift1
if not '%3'=='' (
shift /2
goto :shift1
)
set %1=%2

0
Rar.exe

0
UnRar.exe

17
clearbuild.bat

@ -0,0 +1,17 @@
@echo off
rem ****************************
rem Ñöåíàðèé: clearbuild.bat
rem Äàòà ñîçäàíèÿ 7/5/2008
rem Ïîñëåäíåå èçìåíåíèå: 7/12/2008
rem Àâòîð: Øàøêèí Í. Ñ. kolan klmn
rem E-mail: xalava@bk.ru
rem ****************************
rem Îïèñàíèå: î÷èùàåò äèðåêòîðèþ,
rem âêëþ÷àÿ âñå ïîääèðåêòîðèè îò
rem âðåìåííûõ ôàéëîâ ñáîðêè
rem ****************************
rem Ôàéëû:
rem ****************************
del /s /q /f *.~* *.bak *.bakup *.bkp *.original *.old *.tds *.tmp *.temp *.obj *.o *.ncb BuildLog.htm *.ilk *.pch *.pdb *.manifest *.dep *.idb *.csm *.ilc *.ild *.ilf *.ils *.mbt *.mrt *.#* *.map

28
cleardir.bat

@ -0,0 +1,28 @@
@echo off
rem ****************************
rem Ñöåíàðèé: cleardir.bat
rem Äàòà ñîçäàíèÿ 10/24/2008
rem Ïîñëåäíåå èçìåíåíèå: 10/24/2008
rem Àâòîð: Øàøêèí Í. Ñ. kolan klmn
rem E-mail: xalava@bk.ru
rem ****************************
rem Îïèñàíèå: î÷èùàåò âûáðàííóþ
rem äèðåêòîðèþ, íå óäàëÿÿ å¸ ñàìó
rem ****************************
rem Ôàéëû: òðåáîâàíèÿ ñêðîìíûå
rem ****************************
if '%1'=='' (
del /q *
for /d %%i in (*) do (
rmdir /s /q "%%i"
)
)else (
del /q %1\*
for /d %%i in (%1\*) do (
echo %1\%%i
rmdir /s /q "%%i"
)
)

25
cleardirs.bat

@ -0,0 +1,25 @@
@echo off
rem ****************************
rem Ñöåíàðèé: cleardirs.bat
rem Äàòà ñîçäàíèÿ 10/24/2008
rem Ïîñëåäíåå èçìåíåíèå: 10/24/2008
rem Àâòîð: Øàøêèí Í. Ñ. kolan klmn
rem E-mail: xalava@bk.ru
rem ****************************
rem Îïèñàíèå: î÷èùàåò âñå ïàïêè
rem â âûáðàííîé äèðåêòîðèè
rem ****************************
rem Ôàéëû: òðåáîâàíèÿ ñêðîìíûå
rem ****************************
if '%1'=='' (
for /d %%i in (*) do (
cleardir "%%i"
)
)else (
for /d %%i in (%1\*) do (
cleardir "%%i"
)
)

17
delbkps.bat

@ -0,0 +1,17 @@
@echo off
rem ****************************
rem Ñöåíàðèé: delbkps.bat
rem Äàòà ñîçäàíèÿ 7/5/2008
rem Ïîñëåäíåå èçìåíåíèå: 7/12/2008
rem Àâòîð: Øàøêèí Í. Ñ. kolan klmn
rem E-mail: xalava@bk.ru
rem ****************************
rem Îïèñàíèå: î÷èùàåò äèðåêòîðèþ,
rem âêëþ÷àÿ âñå ïîääèðåêòîðèè îò
rem âðåìåííûõ ôàéëîâ
rem ****************************
rem Ôàéëû:
rem ****************************
del /s /q /f *.~* *.bak *.bakup *.bkp *.original *.old *.tds *.tmp *.temp
rem *.obj

25
fibo_proc.bat

@ -0,0 +1,25 @@
@echo off
rem ****************************
rem Ñöåíàðèé: fibo_proc.bat
rem Äàòà ñîçäàíèÿ 7/10/2008
rem Ïîñëåäíåå èçìåíåíèå: 7/15/2008
rem Àâòîð: Øàøêèí Í. Ñ. kolan klmn
rem E-mail: xalava@bk.ru
rem ****************************
rem Îïèñàíèå: ðåêóðñèâíàÿ ïðîöåäóðà
rem äëÿ âû÷èñëåíèÿ ÷èñåë Ôèáîíà÷è.
rem Íå âûçûâàéòå íåïîñðåäñòâåííî,
rem èñïîëüçóéòå ñêðèïò fibo
rem Arg1 - íîìåð ÷èñëà Ôèáîíà÷è
rem Arg2, Arg3 - ïîñëåäîâàòåëüíî èäóùèå 2 ÷èñëà Ôèáîíà÷è
rem ****************************
rem Ôàéëû: ìîæåò ðàáîòàòü âàùå áåç âèíòà
rem ****************************
if %Arg1%==1 goto :EOF
if %Arg1%==2 goto :EOF
set /a Arg1=%Arg1%-1
set /a tmp=%Arg3%
set /a Arg3=%Arg2%+%Arg3%
set /a Arg2=%tmp%
call fibo_proc Arg1 Arg2 Arg3

25
fibonachi.bat

@ -0,0 +1,25 @@
@echo off
rem ****************************
rem Ñöåíàðèé: fibonachi.bat
rem Äàòà ñîçäàíèÿ 7/10/2008
rem Ïîñëåäíåå èçìåíåíèå: 7/15/2008
rem Àâòîð: Øàøêèí Í. Ñ. kolan klmn
rem E-mail: xalava@bk.ru
rem ****************************
rem Îïèñàíèå: Âûäà¸ò îäíî
rem èç ÷èñåë Ôèáîíà÷è, íîìåð êîòîðîãî
rem çàäàí ïàðàìåòðîì êîìàíäíîé ñòðîêè
rem ****************************
rem Ôàéëû: òðåáóåò fibo_proc.bat
rem ****************************
@echo off
set /a Arg1=%1
set /a Arg2=1
set /a Arg3=1
call fibo_proc
echo %Arg3%
pause

3
format_c.bat

@ -0,0 +1,3 @@
echo %*
indent -npro -kr -i8 -ts8 -sob -l128 -ss -ncs -cp1 %*
del *~

5
format_cpp.bat

@ -0,0 +1,5 @@
rem âîçìîæíî íóæíûå -S -F -j
rem íåíóæíûå -B -G -P -D -d -U -E -y -e -J -O -o
rem astyle --style=1tbs -x -C -N -L -w -Y -f --max-instatement-indent=80 --min-conditional-indent=0 -T8 -c -k3 --mode=c -n --lineend=windows -F -H -U -p -K %*
rem astyle --style=linux -x -C -N -L -w -Y -f --max-instatement-indent=80 --min-conditional-indent=0 -T8 -c -k3 --mode=c -n --lineend=windows -F -H -U -p -K %*
astyle --style=linux -C -N -L -w -Y -f --max-instatement-indent=80 --min-conditional-indent=0 -T8 -c -k3 --mode=c -n --lineend=windows -F -H -U -p %*

3
getBCBtemplate.bat

@ -0,0 +1,3 @@
mkdir %1
copy c:\home\kolan\devel\templ\%1\* %1\

0
gzip.exe

16
hide.bat

@ -0,0 +1,16 @@
@echo off
rem ****************************
rem Ñöåíàðèé: hide.bat
rem Äàòà ñîçäàíèÿ 8/5/2008
rem Ïîñëåäíåå èçìåíåíèå: 8/5/2008
rem Àâòîð: Øàøêèí Í. Ñ. kolan klmn
rem E-mail: xalava@bk.ru
rem ****************************
rem Îïèñàíèå: ïðÿ÷åò (äåëàåò ñèñòåìíûìè)
rem âñå ôàéëû â ïîäêàòàëîãàõ
rem ****************************
rem Ôàéëû: òðåáóåò õîðîøåãî íàñòðîåíèÿ
rem ****************************
attrib +h /s %1

24
lastparm.bat

@ -0,0 +1,24 @@
@echo off
rem ****************************
rem Ñöåíàðèé: lastparm.bat
rem Äàòà ñîçäàíèÿ 7/15/2008
rem Ïîñëåäíåå èçìåíåíèå: 7/15/2008
rem Àâòîð: Øàøêèí Í. Ñ. kolan klmn
rem E-mail: xalava@bk.ru
rem ****************************
rem Îïèñàíèå: çàíîñèò ïîñëåäíèé
rem ïàðàìåòð â ïåðåìåííóþ, çàäàííóþ
rem ïåðâûì ïàðàìåòðîì, íàïðèìåð
rem call lastparm v1 Âàñÿ Êîëÿ Ïåòÿ
rem çàíåñ¸ò Ïåòÿ â ïåðåìåííóþ v1
rem ****************************
rem Ôàéëû: òðåáóåò lastarg.bat
rem ****************************
:shift1
if not '%3'=='' (
shift /2
goto :shift1
)
set %1=%2

18
logrotate.conf.example

@ -0,0 +1,18 @@
rem Sample configuration file for logrotatew
rem Comments start with "rem", obviously
rem Optional command to compress rotated logs
compresscmd gzip
rem Extension that compressed files will have; "compressext" is required if you use "compresscmd"
compressext gz
rem Optional command line arguments for the compression command; uncomment if necessary
rem compressoptions -v
rem Rotate c:\temp\test.log, keeping 5 generations
c:\temp\test.log 5
rem Compress all files matching *.log in c:\temp\logs, keeping 5 generations
c:\temp\logs\*.log 5

125
logrotatew.bat

@ -0,0 +1,125 @@
@echo off
rem The author of the scipt can be found here http://www.datori.org/?p=7
rem Poor man's logrotate for Windows command shell
rem Usage: cmd /v:on /c logrotate.cmd [-f <configfile>]
rem where <configfile> is a fully qualified name of a configuration file.
rem If <configfile> is not specified an attempt is made to locate
rem logrotatew.conf in the current directory. If it is not found the script
rem fails.
rem A configuration file specifies log file name patterns and how many
rem generations to keep. For example, a line in the configuration file:
rem "c:\temp\*.log 5" will cause rotation of every file with the extension
rem ".log" in the specified directory, keeping 5 generations of rotated files.
rem The rotated files can be optionally compressed. See comments in the sample
rem logrotatew.conf for more details.
rem The script rotates the los specified by the configuration file each time
rem it is invoked. Schedule it in Windows Scheduler as often as you need, e.g.
rem at 23:55 /every:Su cmd /v:on /c logrotatew.cmd -f c:\logrotatew.conf
rem NOTE: the script must be invoked with "cmd /v:on /c logrotate.cmd [-f <configfile>]"
rem otherwise it will not work properly!
rem Copyright (c) Nick Ivanov/datori 2007
rem All rights reserved.
rem
rem Redistribution and use in source and binary forms, with or without
rem modification, are permitted provided that the following conditions
rem are met:
rem 1. Redistributions of source code must retain the above copyright
rem notice, this list of conditions and the following disclaimer.
rem 2. Redistributions in binary form must reproduce the above copyright
rem notice, this list of conditions and the following disclaimer in the
rem documentation and/or other materials provided with the distribution.
rem 3. The name of the author may not be used to endorse or promote products
rem derived from this software without specific prior written permission.
rem
rem THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
rem IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
rem OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
rem IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
rem INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
rem NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
rem DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
rem THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
rem (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
rem THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
rem === Begin main ===
setlocal
rem Default configuration file
set _CONFIGFILE=logrotatew.conf
rem See if another config file is specified
if "%1" == "-f" set _CONFIGFILE=%2
if not "%1" == "" if not "%1" == "-f" (echo [err] Invalid switch: "%1" & exit /b 1)
rem See if config file exists
if not exist !_CONFIGFILE! echo [err] Configuration file !_CONFIGFILE! not found & exit /b 1
rem Parse the file and invoke rotation subprogram for each file name that matches the pattern
for /f "tokens=1,2,3,*" %%f in (!_CONFIGFILE!) do call :f_cfg %%f %%g %%h
endlocal
goto :eof
rem ==== End main ====
rem === Begin f_cfg ===
:f_cfg
rem Parse configuration file
rem Skip comments and blank lines
if "%1" == "" goto :eof
if /I "%1" == "rem" goto :eof
if /I "%1" == "compresscmd" set _COMPR_=%2 & goto :eof
if /I "%1" == "compressext" set _EXT_=%2 & goto :eof
if /I "%1" == "compressoptions" set _COPTS_=%2 & goto :eof
rem This must be a file specification
for %%n in (%1) do call :f_rotate %%n %2
goto :eof
rem ==== End f_cfg ====
rem === Begin f_rotate ===
:f_rotate
rem Delete the last file in sequence
if exist %1.%2 del /q %1.%2
if exist %1.%2.!_EXT_! del /q %1.%2.!_EXT_!
rem Rotate non-current files
for /l %%i in (%2,-1,2) do (
set i=%%i
set /a j=i-1
for /f %%f in ("%1") do (
if exist %1.!j!.!_EXT_! ren %1.!j!.!_EXT_! %%~nxf.%%i.!_EXT_!
if exist %1.!j! (
ren %1.!j! %%~nxf.%%i
if not "!_COMPR_!" == "" !_COMPR_! !_COPTS_! %1.%%i
)
)
)
rem Rotate current file
for /f %%f in ("%1") do (
ren %1 %%~nxf.1
if not "!_COMPR_!" == "" !_COMPR_! !_COPTS_! %1.1
)
goto :eof
rem ==== End f_rotate ====

19
makedirs.bat

@ -0,0 +1,19 @@
@echo off
rem ****************************
rem Ñöåíàðèé: makedirs.bat
rem Äàòà ñîçäàíèÿ 7/13/2008
rem Ïîñëåäíåå èçìåíåíèå: 7/13/2008
rem Àâòîð: Øàøêèí Í. Ñ. kolan klmn
rem E-mail: xalava@bk.ru
rem ****************************
rem Îïèñàíèå: ñîçäà¸ò íóìåðîâàííûå
rem ïàïêè. Íàïðèìåð, makedirs 56 88 kolya
rem ñîçäàñò ïàïêè kolya56, kolya57, ..., kolya88
rem ****************************
rem Ôàéëû: òðåáóåò õîðîøåãî íàñòðîåíèÿ
rem ****************************
for /l %%i in (%1 1 %2) do (
mkdir %3%%i
)

32
rardir.bat

@ -0,0 +1,32 @@
@echo off
rem ****************************
rem ‘業 à¨©: rardir.bat
rem „ â  ᮧ¤ ­¨ï 7/5/2008
rem �®á«¥¤­¥¥ ¨§¬¥­¥­¨¥: 7/12/2008
rem €¢â®à: ˜ èª¨­ �. ‘. kolan klmn
rem E-mail: xalava@bk.ru
rem ****************************
rem Ž¯¨á ­¨¥: ᨭåà®­¨§¨àã¥â (ᮧ¤ ñâ ¯à¨
rem ­¥®¡å®¤¨¬®áâ¨)  à娢 á ¢ë¡à ­­®©
rem ¤¨à¥ªâ®à¨¥©. …᫨ ¤¨à¥ªâ®à¨ï § ¤ ­ 
rem ¯ à ¬¥â஬, â®  à娢 ᮧ¤ ñâáï ¢ ⥪ã饩
rem ¤¨à¥ªâ®à¨¨, ¨­ ç¥ - ¢ த¨â¥«ì᪮©.
rem ****************************
rem ” ©«ë: âॡã¥â rar «î¡®© ¢¥àᨨ
rem ¨ ¤®áâ㯠 ª ¢à¥¬¥­­®© ¤¨à¥ªâ®à¨¨,
rem ®¯à¥¤¥«ñ­­®© ¢ ¯¥à¥¬¥­­®© TMP
rem ****************************
if '%1'=='' (
cd > "%TMP%\rardir.tmp"
for /f "usebackq tokens=1-31 delims==\" %%A in (`type "%TMP%\rardir.tmp"`) do (
cd ..
del /s/q/f "%TMP%\rardir.tmp"
rardir_proc.bat %%A "%%B" "%%C" "%%D" "%%E" "%%F" "%%G" "%%H" "%%I" "%%J" "%%K" "%%L" "%%M" "%%N" "%%O" "%%P" "%%Q" "%%R" "%%S" "%%T" "%%U" "%%V" "%%W" "%%X" "%%Y" "%%Z"
goto :EOF
)
)
else (
rar a -as %1.rar %1
)

25
rardir_proc.bat

@ -0,0 +1,25 @@
@echo off
rem ****************************
rem Ñöåíàðèé: rardir_proc.bat
rem Äàòà ñîçäàíèÿ 7/13/2008
rem Ïîñëåäíåå èçìåíåíèå: 7/13/2008
rem Àâòîð: Øàøêèí Í. Ñ. kolan klmn
rem E-mail: xalava@bk.ru
rem ****************************
rem Îïèñàíèå: íà âõîäå ïîëó÷àåò ïîëíûé ïóòü
rem ê äèðåêòîðèè, êîòîðóþ òðåáóåòñÿ çààðõèâèðîâàòü.
rem Âñå \ â ïóòè äîëæíû áûòü çàìåíåíû ïðîáåëàìè (èëè tab),
rem íàïðèìåð, "c:" "Documents and Settings" "Ìàñÿíÿ" "ñæèìàåìàÿ ïàïêà".
rem Áóäó÷è çàïóùåííûì ñ òåêóùåé äèðåêòîðèåé "Ìàñÿíÿ",
rem ñîçäà¸ò â íåé àðõèâ "ñæèìàåìàÿ ïàïêà.rar".
rem ****************************
rem Ôàéëû: òðåáóåò rar ëþáîé âåðñèè
rem ****************************
:shift1
if not %2=="" (
shift /1
goto :shift1
)
rar a -as %1.rar %1

20
rardirs.bat

@ -0,0 +1,20 @@
@echo off
rem ****************************
rem Ñöåíàðèé: rardirs.bat
rem Äàòà ñîçäàíèÿ 7/5/2008
rem Ïîñëåäíåå èçìåíåíèå: 7/12/2008
rem Àâòîð: Øàøêèí Í. Ñ. kolan klmn
rem E-mail: xalava@bk.ru
rem ****************************
rem Îïèñàíèå: ñèíõðîíèçèðóåò (ñîçäà¸ò ïðè
rem íåîáõîäèìîñòè) âñå àðõèâû â äèðåêòîðèè
rem ñî âñåìè ïîääèðèêòîðèÿìè
rem ****************************
rem Ôàéëû: òðåáóåò rar ëþáîé âåðñèè
rem ****************************
for /d %%i in (*) do (
rar a -as "%%i.rar" "%%i"
)

8
sync_any_hg.bat

@ -0,0 +1,8 @@
hg pull
hg up
hg sta
pause
hg addremove
hg ci -m "данные с работы"
hg push
pause
Loading…
Cancel
Save