File: RecreateUserList.sh

package info (click to toggle)
licq 1.3.4-2etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 22,052 kB
  • ctags: 8,640
  • sloc: cpp: 76,924; sh: 9,845; ansic: 5,424; perl: 3,449; lex: 857; xml: 804; php: 691; makefile: 393; csh: 48
file content (25 lines) | stat: -rwxr-xr-x 646 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh

BASE=${HOME}/.licq
CONF="${BASE}/users.conf"

echo "Licq User List Recreation App"
echo
echo "This script will rebuild your user list from the user config files found"
echo "in ${BASE}.  It will overwrite your old list."
echo "Continue (y/N)?"
read CONTINUE

if [ "$CONTINUE" != "y" -a "$CONTINUE" != "Y" ]; then
  echo "Aborting."
  exit
fi 

echo "Rebuilding user list configuration file in $BASE..."
cd ${BASE}/users
echo "[users]" > $CONF
NumOfUsers=`ls *.uin *.Licq *.MSN_ | wc -l`
echo "NumOfUsers = ${NumOfUsers}" >> $CONF
ls *.Licq *.MSN_ *.uin | awk 'BEGIN { i = 1 } { printf "User%d = %s\n", i++, $1 }' >> $CONF
echo "Done"