Skip to content

Commit fc0dd25

Browse files
committed
Example script to use an argument
1 parent 5b61dec commit fc0dd25

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pimsync.example.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
# DISCLAIMER: This script comes without any warranty.
44
# It works for me but may not work for you. Back your data up first!
55

6-
CARD_DIR="/run/media/$USER/palmOne 128"
76
JPILOT_DIR="$HOME/.jpilot"
87

9-
ps_dir="$CARD_DIR/PIMSync"
8+
card_dir="$(readlink -f "$1")"
9+
ps_dir="$card_dir/PIMSync"
1010

1111
for i in AddressDB DatebookDB MemoDB ToDoDB; do
1212
pdb_file="$i".pdb
@@ -25,7 +25,7 @@ for i in AddressDB DatebookDB MemoDB ToDoDB; do
2525
cp "$ps_dir"/$pdb_file "$JPILOT_DIR"/pimsync_backup_card
2626

2727
# Merge local changes into card versions
28-
echo -e "\nMerging $pdb_file:"
28+
printf "\nMerging %s:" "$pdb_file"
2929
jpilot-merge "$ps_dir"/$pdb_file "$JPILOT_DIR"/$pc3_file \
3030
"$JPILOT_DIR"/$pdb_file
3131
rm "$JPILOT_DIR"/$pc3_file

0 commit comments

Comments
 (0)