Advertisement
Guest User

Untitled

a guest
Jan 18th, 2020
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.27 KB | None | 0 0
  1. #!/bin/bash
  2. VER=2.5
  3.  
  4. #--[ Intro ]--------------------------------------------------------#
  5. # #
  6. # Tur-Archiver 2.x is a total rewrite from 1.x. It can copy, move #
  7. # or make symlinks from whatever you want, to wherever you want. #
  8. # #
  9. # It is NOT a spacemaker and shouldnt be used as such. #
  10. # #
  11. # Its more ment as a "sorter" of some kind. You specify WHERE it #
  12. # should look, WHAT it should look for and WHERE you want to put it.#
  13. # By putting it, I mean either copy, move or make a symlink to it. #
  14. # #
  15. #--[ Installation ]-------------------------------------------------#
  16. # #
  17. # Copy tur-archiver.sh to /glftpd/bin and chmod it to 700 or so. #
  18. # #
  19. # The included file_date binary is only needed if you wish to set a #
  20. # time, in minutes, before this script touches it. If so, either #
  21. # copy the binary to /glftpd/bin or compile the source: #
  22. # gcc -o /glftpd/bin/file_date file_date.c #
  23. # #
  24. #--[ Settings ]-----------------------------------------------------#
  25. # #
  26. # GLROOT = Simple the root of your glftpd dir. #
  27. # This is automatically added to the front of each #
  28. # source and destination dir you soon choose. #
  29. # #
  30. # SITEROOT = Path to 'site', from $GLROOT. /site is usually ok. #
  31. # #
  32. # today = Incase you wish to use this in dated dirs, this will #
  33. # automatically set $today to todays dated dir (MMDD). #
  34. # The we can use $today in MOVE below. #
  35. # #
  36. # MOVE = Ahh, the heart of it all. #
  37. # Format is: #
  38. # Where_To_Look:What_To_Look_For:Where_To_Put_It #
  39. # #
  40. # Where_To_Look is the source section, relative to #
  41. # $GLROOT$SITEROOT, which it will look for stuff in. #
  42. # If you must use a space here, use [space] instead. #
  43. # -#
  44. # If you are working with dated dirs (for example) it #
  45. # might be a bit tedious to add: #
  46. # /0DAY/0203 #
  47. # /0DAY/0204 etc. #
  48. # Instead, you can specify /0DAY~DEEP here. #
  49. # It will then go into every subdir, part from those #
  50. # in EXCLUDE= (below) and process each dir as if you #
  51. # had set them up the slow way. #
  52. # #
  53. # What_To_Look_For is a standard egrep query. That #
  54. # means you should know something about basic egrep to #
  55. # use it at best. For instance GROUPS means it will #
  56. # match the word GROUPS anywhere in the release. #
  57. # #
  58. # ^GROUPS means the dir must START with GROUPS. #
  59. # GROUPS$ means the dir must END with GROUPS. #
  60. # ^GROUPS$ means the dir must be named exactly GROUPS. #
  61. # #
  62. # Any odd chars must be escaped. For instance a . #
  63. # would mean "anything" whereas \. means a real dot. #
  64. # #
  65. # Do NOT use spaces in this one. If you must, use "\ " #
  66. # (ie, escape the space). #
  67. # #
  68. # If you want to search for - . OR _ do [\_-\.] #
  69. # For instance [\_-\.]internal[\_-\.] #
  70. # #
  71. # Seperate different querys with a | sign. #
  72. # #
  73. # Where_To_Put_It is where to put the resulting dir. #
  74. # If you must use a space here, use [space] instead. #
  75. # #
  76. # EXAMPLE: /0DAY~DEEP:^The\.|\-BP$:/Links #
  77. # Go into every subdir of /0DAY, looking for stuff #
  78. # that STARTS with "The." and stuff that ENDS with -BP #
  79. # and put the results in /Links (/glftpd/site/Links). #
  80. # #
  81. # CASE_SENSITIVE= TRUE/FALSE. Do you want the What_To_Look_For to #
  82. # be case sensitive or not? (egrep -i) #
  83. # #
  84. # WHAT_TO_DO = What would you like to do in the destination dir? #
  85. # S = Make a symlink. #
  86. # C = Copy the release here. #
  87. # M = Move the release here. #
  88. # #
  89. # EXCLUDE = This too is a default egrep line, case sensitive. #
  90. # Anything matched here will be totally ignored #
  91. # even if it matches a hit. #
  92. # #
  93. # MINUTES_OLD= How old, in minutes, must the release be before we #
  94. # do anything to it? Set to "" to move instantly. #
  95. # (setting it to 0 will also, but script will run #
  96. # faster if you set it to "" since it wont even check) #
  97. # #
  98. # CHECK_FOR = Anything that must be in the dir before we move it. #
  99. # #
  100. # By default, its "\ COMPLETE\ \)\ \-" #
  101. # which translates to " COMPLETE ) -" #
  102. # That happens to be the default line for a complete #
  103. # release with zipscript-c. #
  104. # #
  105. # If the release has multiple CD's, each CDx dir must #
  106. # contain this (We'll only check CD1 -> CD9) #
  107. # #
  108. # This is also an egrep search, case sensitive, so if #
  109. # you want to add other stuff that should also make #
  110. # the release ok to move just add it here, | seperated #
  111. # #
  112. # Set to "" to disable or put a # infront of it. #
  113. # #
  114. # TULS = This is only valid if WHAT_TO_DO is set to M for #
  115. # move. It will grab the date on the release before #
  116. # moving it and after the move, touch the dir to that #
  117. # date so it keeps the same time on it. #
  118. # Not everyone needs this as some mv binaries saves #
  119. # the time automatically. #
  120. # #
  121. # To use this function, you'll need a binary called #
  122. # tuls. Its available at www.grandis.nu/glftpd as well.#
  123. # Read the info in for compile instructions, etc. #
  124. # #
  125. # Your touch binary also needs to support -d for #
  126. # specifying which date to touch it with. #
  127. # #
  128. # Leave this empty to disable that function. #
  129. # #
  130. # NO_SFV_OK = TRUE/FALSE. With FALSE, it will just check CHECK_FOR #
  131. # and if it exists, its ok to move it (if its old #
  132. # enough), but some releases would never get moved. #
  133. # Specifically, DIRFIX etc, which has no .sfv and does #
  134. # not have a complete dir. #
  135. # #
  136. # With TRUE, it will check that there really is a sfv #
  137. # in the dir. If there is a sfv and CHECK_FOR is not #
  138. # found, its NOT ok to move yet (not completed). #
  139. # #
  140. # In short, if no sfv exists, its ok to move it anyway #
  141. # as long as its old enough in MINUTES_OLD. #
  142. # #
  143. # HOW_TO_SYMLINK = This is how it will run if WHAT_TO_DO is S. #
  144. # HOW_TO_MOVE = This is how it will run if WHAT_TO_DO is M. #
  145. # HOW_TO_COPY = This is how it will run if WHAT_TO_DO is C. #
  146. # #
  147. # SYMLINK_CLEAR = TRUE/FALSE. This is only valid if WHAT_TO_DO is #
  148. # set to S. #
  149. # If this is TRUE, it will delete every #
  150. # Where_To_Put_It dir before it starts and then #
  151. # recreate them with 755 permissions. #
  152. # Its to make sure there are no "dead" symlinks. #
  153. # Be careful with this, as it will rm -f any dir #
  154. # you set as destination for the symlinks. #
  155. # #
  156. # If you dont want 755 perms, search for -m755 #
  157. # below and change it to whatever you want. #
  158. # #
  159. # REVERSED_SYMLINK= TRUE/FALSE. #
  160. # This is ONLY if you want to move releases. In #
  161. # other words, if WHAT_TO_DO is M. #
  162. # Setting this to TRUE will move the release as #
  163. # usual but then make a symlink in its original #
  164. # location. #
  165. # #
  166. # The symlink will be created using #
  167. # HOW_TO_SYMLINK, set above. #
  168. # #
  169. # These symlinks will not be cleared and #
  170. # SYMLINK_CLEAR has no function here. #
  171. # #
  172. # FILE_DATE = Incase MINUTES_OLD is set, we use the included #
  173. # file_date binary to check its age. Here you specify #
  174. # it location. #
  175. # We could use tuls for this as well, but I'm too lazy #
  176. # #
  177. # DATE_BIN = Incase MINUTES_OLD is set, we need a GNU compliant #
  178. # date binary that supports the -d option. #
  179. # Most users can leave it at just "date". #
  180. # FBSD users will want to download sh-utils. It will #
  181. # install a binary called gdate which you must specify #
  182. # here. #
  183. # #
  184. # DEBUG = TRUE/FALSE. Just a precation. You must set this to #
  185. # FALSE for it to actually do anything. With it on #
  186. # TRUE, its the same as if you used the 'debug' arg. #
  187. # #
  188. #--[ Running it ]---------------------------------------------------#
  189. # #
  190. # Running it with the argument 'debug' (without the '') will not do #
  191. # anything except show you what it WOULD have done. I recomend you #
  192. # use this everytime you make a change in any part. #
  193. # #
  194. # Running it without args will make a live run. Shouldnt output #
  195. # anything then. If DEBUG=TRUE, it will still not do anything ! #
  196. # #
  197. #--[ Changelog ]----------------------------------------------------#
  198. # #
  199. # 2.5 : When checking how old a release is, it simply did not
  200. # work. Now, since nobody has complained about this and its
  201. # been a long time since 2.4, I'm not sure if this applies
  202. # to everyone.
  203. # In either case;
  204. # REL_DATE="`$DATE_BIN -d "$($FILE_DATE $releasename)" +%s`"
  205. # was changed to:
  206. # REL_DATE="`$DATE_BIN -d "$($FILE_DATE $FROM_DIR/$releasename)" +%s`"
  207. # so if the new version does not work for you when checking
  208. # the age of releases, change it back to what it was =)
  209. #
  210. # 2.4 : The path in MOVE now support ~DEEP to enter each subdir #
  211. # of the defined dir. #
  212. # #
  213. # 2.3 : Added TULS=. Read up on it above. #
  214. # #
  215. # Fixed a cosmetic "integer expression expected" if the #
  216. # release is 0 seconds old. #
  217. # #
  218. # 2.2 : Added REVERSED_SYMLINK function. This will make a symlink #
  219. # in the original location of the release if WHAT_TO_DO is #
  220. # set to move stuff. #
  221. # Idea by LPC. #
  222. # #
  223. # Changed ROOT=/glftpd/site to GLROOT=/glftpd #
  224. # Changed SYM_ROOT=/site to SITEROOT=/site #
  225. # Above changes was made to more easely create symlinks. #
  226. # #
  227. # 2.1 : Added NO_SFV_OK. Check explanation above. #
  228. # #
  229. # Fixed a problem if the release was less then 60 seconds #
  230. # old. It would get moved even if MINUTES_OLD was set. #
  231. # #
  232. # Big thanks to DaShizNit for ideas and testing the 2.+ #
  233. # versions. #
  234. # #
  235. # 2.0 : Total rewrite of the 1.x series. Can do a lot more now. #
  236. # #
  237. #--[ Contact ]------------------------------------------------------#
  238. # #
  239. # http://www.grandis.nu/glftpd <-> http://grandis.mine.nu/glftpd #
  240. # #
  241. #--[ Configuration ]------------------------------------------------#
  242.  
  243. GLROOT=/glftpd
  244. SITEROOT=/site
  245.  
  246. today="`date +%m%d`"
  247.  
  248. MOVE="
  249. /0DAYS~DEEP:^The\.|\-BP$:/Links/TheAndBP
  250. /DIVX:GERMAN|FRENCH:/Links/Foreign_Rels
  251. "
  252.  
  253. CASE_SENSITIVE=FALSE
  254.  
  255. WHAT_TO_DO=M
  256.  
  257. EXCLUDE="^lost\+found$|^GROUPS$|^\_PRE$"
  258.  
  259. MINUTES_OLD=""
  260.  
  261. CHECK_FOR="\ COMPLETE\ \)\ \-"
  262.  
  263. NO_SFV_OK=TRUE
  264.  
  265. ## Advanced options.
  266.  
  267. TULS=/glftpd/bin/tuls
  268.  
  269. HOW_TO_SYMLINK="ln -f -s"
  270. HOW_TO_MOVE="mv -f"
  271. HOW_TO_COPY="cp -f"
  272.  
  273. SYMLINK_CLEAR=FALSE
  274.  
  275. REVERSED_SYMLINK=FALSE
  276.  
  277. FILE_DATE=/glftpd/bin/file_date
  278. DATE_BIN=date
  279.  
  280. DEBUG=TRUE
  281.  
  282.  
  283. #--[ Script Start ]-------------------------------------------------#
  284.  
  285. ## Set DEBUG=TRUE if first argument is debug or DEBUG
  286. if [ "$1" = "debug" -o "$1" = "DEBUG" ]; then
  287. DEBUG="TRUE"
  288. fi
  289.  
  290. ## Set how we want to egrep.
  291. if [ "$CASE_SENSITIVE" = "TRUE" ]; then
  292. EGREP="egrep"
  293. else
  294. EGREP="egrep -i"
  295. fi
  296.  
  297. proc_debug() {
  298. if [ "$DEBUG" = "TRUE" ]; then
  299. echo "$*"
  300. fi
  301. }
  302.  
  303. ## Move, copy or make symlinks. Heres where its done.
  304. proc_copy() {
  305.  
  306. if [ "$DATED" = "TRUE" ]; then
  307. SOURCE_DIR="$FROM_DIR_DEEP"
  308. SOURCE_DIRSYM="$FROM_DIRSYM_DEEP"
  309. else
  310. SOURCE_DIR="$FROM_DIR"
  311. SOURCE_DIRSYM="$FROM_DIRSYM"
  312. fi
  313.  
  314. if [ "$DEBUG" = "TRUE" ]; then
  315. echo "$HOW_TO_COPY \"$SOURCE_DIR/$releasename\" \"$TO_DIR\""
  316. echo ""
  317. else
  318. $HOW_TO_COPY "$SOURCE_DIR/$releasename" "$TO_DIR"
  319. fi
  320. }
  321.  
  322. proc_move() {
  323. unset reldate
  324.  
  325. if [ "$TULS" ]; then
  326. if [ ! -x "$TULS" ]; then
  327. echo "Warning. Cant execute $TULS. Check perms."
  328. echo "Leave the TULS= option empty to disable or fix so tuls is executable."
  329. exit 1
  330. else
  331. reldate="`$TULS | grep "\:\:\:\:$releasename\:\:\:\:" | head -n1 | cut -d ':' -f17- | cut -d '^' -f3,2,5,4 | tr '^' ' '`"
  332. fi
  333. fi
  334.  
  335. if [ "$DATED" = "TRUE" ]; then
  336. SOURCE_DIR="$FROM_DIR_DEEP"
  337. SOURCE_DIRSYM="$FROM_DIRSYM_DEEP"
  338. else
  339. SOURCE_DIR="$FROM_DIR"
  340. SOURCE_DIRSYM="$FROM_DIRSYM"
  341. fi
  342.  
  343. if [ "$DEBUG" = "TRUE" ]; then
  344. echo "$HOW_TO_MOVE \"$SOURCE_DIR/$releasename\" \"$TO_DIR\""
  345. if [ "$REVERSED_SYMLINK" != "TRUE" -a -z "$reldate" ]; then
  346. echo ""
  347. fi
  348. else
  349. $HOW_TO_MOVE "$SOURCE_DIR/$releasename" "$TO_DIR"
  350. fi
  351.  
  352. ## Make a symlink it the original location, if enabled.
  353. if [ "$REVERSED_SYMLINK" = "TRUE" ]; then
  354. if [ "$DEBUG" = "TRUE" ]; then
  355. echo "$HOW_TO_SYMLINK \"$TO_DIRSYM/$releasename\" \"$SOURCE_DIR/$releasename\""
  356. if [ -z "$reldate" ]; then
  357. echo ""
  358. fi
  359. else
  360. $HOW_TO_SYMLINK "$TO_DIRSYM/$releasename" "$SOURCE_DIR/$releasename"
  361. fi
  362. fi
  363.  
  364. if [ "$reldate" ]; then
  365. if [ "$DEBUG" = "TRUE" ]; then
  366. echo "touch -d \"$reldate\" \"$TO_DIR/$releasename\""
  367. echo ""
  368. else
  369. touch -d "$reldate" "$TO_DIR/$releasename"
  370. fi
  371. fi
  372. }
  373.  
  374. proc_symlink() {
  375.  
  376. if [ "$DATED" = "TRUE" ]; then
  377. SOURCE_DIR="$FROM_DIR_DEEP"
  378. SOURCE_DIRSYM="$FROM_DIRSYM_DEEP"
  379. else
  380. SOURCE_DIR="$FROM_DIR"
  381. SOURCE_DIRSYM="$FROM_DIRSYM"
  382. fi
  383.  
  384. if [ "$DEBUG" = "TRUE" ]; then
  385. echo "$HOW_TO_SYMLINK \"$SOURCE_DIRSYM/$releasename\" \"$TO_DIR/$releasename\""
  386. echo ""
  387. else
  388. $HOW_TO_SYMLINK "$SOURCE_DIRSYM/$releasename" "$TO_DIR/$releasename"
  389. fi
  390. }
  391.  
  392. ## Procedure for checking if the release is old enough.
  393. proc_checkold() {
  394. if [ "$MINUTES_OLD" ] && [ "$SKIP" != "YES" ]; then
  395. REL_DATE="`$DATE_BIN -d "$($FILE_DATE $FROM_DIR/$releasename)" +%s`"
  396. if [ -z "$REL_DATE" ]; then
  397. SKIP=YES
  398. proc_debug "Skipping move of $releasename - Seems to be from right now or in the future... or $FILE_DATE dosnt work."
  399. else
  400. REL_SEC_OLD="`echo "$NOW_DATE - $REL_DATE" | bc -l | cut -d '.' -f1`"
  401. if [ -z "$REL_SEC_OLD" ]; then
  402. REL_SEC_OLD="0"
  403. fi
  404. REL_MIN_OLD="`echo "$REL_SEC_OLD / 60" | bc -l | cut -d '.' -f1`"
  405. if [ -z "$REL_MIN_OLD" ]; then
  406. REL_MIN_OLD="0"
  407. fi
  408. proc_debug "$releasename seems to be $REL_MIN_OLD minutes old."
  409. if [ "$REL_MIN_OLD" -lt "$MINUTES_OLD" ]; then
  410. SKIP=YES
  411. proc_debug "Skipping move of $releasename - Only $REL_MIN_OLD minutes old."
  412. fi
  413. fi
  414. fi
  415. }
  416.  
  417. ## Procedure for checking for other stuff in the release to OK it.
  418. proc_checkfor() {
  419. if [ "$CHECK_FOR" ] && [ "$SKIP" != "YES" ]; then
  420.  
  421. ## Multiple CD's ?
  422. if [ "`ls -1 $releasename | grep "^[cC][dD][1-9]$"`" ]; then
  423.  
  424. for each_cd in `ls -1 $releasename | grep "^[cC][dD][1-9]$"`; do
  425. if [ -z "`ls -1 $releasename/$each_cd | egrep "$CHECK_FOR"`" ]; then
  426. if [ "$NO_SFV_OK" = "TRUE" ]; then
  427. if [ "`ls -1 $releasename/$each_cd | grep "\.[sS][fF][vV]$"`" ]; then
  428. proc_debug "Skipping $releasename - $each_cd does not seem complete and a sfv exists."
  429. SKIP=YES
  430. break
  431. else
  432. proc_debug "OK on $releasename/$each_cd - $each_cd does not seem complete and no sfv exists."
  433. fi
  434. else
  435. proc_debug "Skipping $releasename - $each_cd does not seem completed."
  436. SKIP=YES
  437. break
  438. fi
  439. fi
  440. done
  441.  
  442. ## Single CD release.
  443. else
  444. if [ -z "`ls -1 $releasename | egrep "$CHECK_FOR"`" ]; then
  445. if [ "$NO_SFV_OK" = "TRUE" ]; then
  446. if [ "`ls -1 $releasename | grep "\.[sS][fF][vV]$"`" ]; then
  447. proc_debug "Skipping $releasename - Does not seem complete and a sfv exists."
  448. SKIP=YES
  449. else
  450. proc_debug "OK on $releasename - does not seem complete and no sfv exists."
  451. fi
  452. else
  453. proc_debug "Skipping $releasename - Does not seem complete."
  454. SKIP=YES
  455. fi
  456. fi
  457. fi
  458. fi
  459. }
  460.  
  461. if [ "$MINUTES_OLD" ]; then
  462. NOW_DATE="`$DATE_BIN +%s`"
  463. if [ ! -x "$FILE_DATE" ]; then
  464. echo "Error. MINUTES_OLD is defined but cant find/execute file_date from $FILE_DATE"
  465. exit 1
  466. fi
  467. fi
  468.  
  469. ## If we use symlinks and SYMLINK_CLEAR is TRUE, delete all TO_DIRs and recreate
  470. if [ "$WHAT_TO_DO" = "S" ] && [ "$SYMLINK_CLEAR" = "TRUE" ]; then
  471. for rawdata in $MOVE; do
  472. TO_DIR="$ROOT`echo "$rawdata" | cut -d ':' -f3 | sed -e 's/\[space\]/ /g'`"
  473. if [ "$TO_DIR" != "$LAST_TO_DIR" ]; then
  474. if [ -d "$TO_DIR" ]; then
  475. if [ "$DEBUG" = "TRUE" ]; then
  476. echo "Deleting and recreating $TO_DIR"
  477. else
  478. rm -rf "$TO_DIR"
  479. mkdir -m755 "$TO_DIR"
  480. fi
  481. fi
  482. fi
  483. LAST_TO_DIR="$TO_DIR"
  484. done
  485. fi
  486.  
  487. ## Go. Main loop.
  488. for rawdata in $MOVE; do
  489. unset SKIP; unset DATED
  490. FROM_DIR="$GLROOT$SITEROOT`echo "$rawdata" | cut -d ':' -f1 | sed -e 's/\[space\]/ /g'`"
  491. FROM_DIRSYM="$SITEROOT`echo "$rawdata" | cut -d ':' -f1 | sed -e 's/\[space\]/ /g'`"
  492.  
  493. GRAB_WHAT="`echo "$rawdata" | cut -d ':' -f2`"
  494.  
  495. if [ "`echo "$FROM_DIR" | grep "~"`" ]; then
  496. DATED="TRUE"
  497. FROM_DIR="`echo "$FROM_DIR" | cut -d '~' -f1`"
  498. FROM_DIRSYM="`echo "$FROM_DIRSYM" | cut -d '~' -f1`"
  499. fi
  500.  
  501. TO_DIR="$GLROOT$SITEROOT`echo "$rawdata" | cut -d ':' -f3 | sed -e 's/\[space\]/ /g'`"
  502. TO_DIRSYM="$SITEROOT`echo "$rawdata" | cut -d ':' -f3 | sed -e 's/\[space\]/ /g'`"
  503.  
  504. if [ ! -d "$FROM_DIR" ]; then
  505. echo "Error. \"$FROM_DIR\" does not exist."
  506. SKIP=YES
  507. fi
  508. if [ ! -d "$TO_DIR" ]; then
  509. echo "Error. \"$TO_DIR\" does not exist."
  510. SKIP=YES
  511. fi
  512.  
  513. if [ "$SKIP" != "YES" ]; then
  514. proc_debug ""
  515. if [ "$DATED" != "TRUE" ]; then
  516. proc_debug "Entering $FROM_DIR - Looking for \"$GRAB_WHAT\""
  517. fi
  518.  
  519. cd "$FROM_DIR"
  520.  
  521. if [ "$DATED" = "TRUE" ]; then
  522. for subsection in `ls -1 | egrep -v "$EXCLUDE" | tr ' ' '^'`; do
  523. cd "$FROM_DIR"
  524. cd "$subsection"
  525.  
  526. FROM_DIR_DEEP="$FROM_DIR/$subsection"
  527. FROM_DIRSYM_DEEP="$FROM_DIRSYM/$subsection"
  528.  
  529. proc_debug "Entering (DEEP) $FROM_DIR/$subsection - Looking for \"$GRAB_WHAT\""
  530. for releasename in `ls -1 | $EGREP "$GRAB_WHAT" | egrep -v "$EXCLUDE" | tr ' ' '^'`; do
  531. unset SKIP
  532. releasename="`echo "$releasename" | tr '^' ' '`"
  533.  
  534. proc_checkold
  535. proc_checkfor
  536.  
  537. if [ "$SKIP" != "YES" ]; then
  538. case $WHAT_TO_DO in
  539. [mM]) proc_move;;
  540. [cC]) proc_copy;;
  541. [sS]) proc_symlink;;
  542. esac
  543. fi
  544. done
  545. done
  546. else
  547. for releasename in `ls -1 | $EGREP "$GRAB_WHAT" | egrep -v "$EXCLUDE" | tr ' ' '^'`; do
  548. unset SKIP
  549. releasename="`echo "$releasename" | tr '^' ' '`"
  550.  
  551. proc_checkold
  552. proc_checkfor
  553.  
  554. if [ "$SKIP" != "YES" ]; then
  555. case $WHAT_TO_DO in
  556. [mM]) proc_move;;
  557. [cC]) proc_copy;;
  558. [sS]) proc_symlink;;
  559. esac
  560. fi
  561. done
  562. fi
  563. fi
  564.  
  565. done
  566.  
  567. proc_debug""
  568. proc_debug "All done."
  569.  
  570. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement