File: copy-to-import-folder.sh

package info (click to toggle)
nixnote2 2.1.6%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 11,916 kB
  • sloc: cpp: 79,037; java: 1,096; sh: 275; ansic: 10; makefile: 6
file content (15 lines) | stat: -rwxr-xr-x 454 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash
# workaround helper script example for Import Folders
#
# actually this not needed anymore, see end of the https://github.com/robert7/nixnote2/issues/14


if [ ! -f "$1" ]; then echo 1st param needs to be existing file!; exit 1; fi
if [ ! -d "$2" ]; then echo 2nd param needs to be existing directory!; exit 1; fi


# copy file with ".tmp" file extension to targed directory
cp $1 $2/$1.tmp

# rename file to original name
mv $2/$1.tmp $2/$1