-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for static DMR IDs in User.bin before flashdb
Allows private user DMR IDs to be inserted into the normal contact user list
- Loading branch information
Showing
3 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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,,,, |