Skip to content

Commit

Permalink
Add support for static DMR IDs in User.bin before flashdb
Browse files Browse the repository at this point in the history
Allows private user DMR IDs to be inserted into the normal contact user
list
  • Loading branch information
KD4Z committed Dec 24, 2016
1 parent 5d8f152 commit 164225b
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
37 changes: 37 additions & 0 deletions addstatic
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash
# addstatic
# KD4Z
# Version: 1
# script to add static DMR ids into the usersCSV after glv
# requires a simple file that mimics the exact field layout of user.bin
# must contain seven fields, separated by commas
# (that means 6 commas per line)
# leave field blank if no data is needed for a given field

# filename containing static user data is named: static.users

# Example:
# privateID1,call1,name1,city1,state1,nickname1,country1
# privateID2,call2,name2,,,nickname2,
# privateID3,call3,name3,,,,

# useage:
# after running glv, but before running flashdb, run this script
# one time. Don't leave off the ./ or the script won't be found
#
# ./addstatic
#
# then, run flashdb as usual

FILE=static.users

if [ -f $FILE ]; then
cat $FILE >>user.bin
sort -k 1 -n user.bin >usersorted.tmp
cat usersorted.tmp >user.bin
rm usersorted.tmp
wc --lines $FILE
echo "Import of static DMR IDs complete"
else
echo "Could not find file containing static user info. Filename '$FILE' "
fi
15 changes: 15 additions & 0 deletions install_static
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
# install_static
# KD4Z
# Version: 1
# script to add install the script that imports static DMR ids into the usersCSV after glv
# To install or update the addstatic script, run this from the tyt home directory prompt
#
# wget https://github.com/KD4Z/md380tools-vm/blob/master/install_static && sudo bash install_static

wget https://github.com/KD4Z/md380tools-vm/blob/master/addstatic
wget https://github.com/KD4Z/md380tools-vm/blob/master/static.users.sample
chmod +x addstatic

echo "Create a file called 'static.users' using the example file 'static.users.example' as a guide"
echo "Then run glv, followed by ./addstatic, then flashdb"
3 changes: 3 additions & 0 deletions static.users.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
101,call1,name1,city1,state1,nickname1,country1
102,call2,name2,,,nickname2,
103,call3,name3,,,,

0 comments on commit 164225b

Please sign in to comment.