WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: devs2dev  (Read 2574 times)

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
devs2dev
« on: November 27, 2009, 03:24:35 AM »
Changes devs to dev files; run in database (for update script)  or tce_dir

Code: [Select]
#!/bin/ash

 ### devs2dev.sh script.    jpeters
  

## EDIT DB:

DB="./"

cd ${DB}
FILES="$(ls | grep -E 'devs')"

for I in  ${FILES}
 do
  echo ${I} >/tmp/old
  NEW="$(cat /tmp/old | sed 's/devs/dev/')"
  sudo mv ${I} ${NEW}
 done

[ -f /tmp/old ] && sudo rm /tmp/old

« Last Edit: November 27, 2009, 12:31:59 PM by jpeters »

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: devs2dev
« Reply #1 on: November 27, 2009, 04:51:21 AM »
For .dep files:

Code: [Select]

#!/bin/ash

 ### devs2dev-deps.sh script. jpeters
 ## changes devs to dev  in .dep files

## EDIT DB:

DB="./"

cd ${DB}
FILES="$(ls | grep -E '\.dep')"

for I in  ${FILES}
 do
  sed -i 's/devs/dev/g'  ${I}
 done

« Last Edit: November 27, 2009, 12:32:24 PM by jpeters »