From 9d8d6e2cacc4b66499dd233432869ef17151a733 Mon Sep 17 00:00:00 2001 From: Laurent Ghigonis Date: Tue, 18 Jun 2013 12:59:04 +0200 Subject: jsaccess: naming --- jsaccess/Makefile | 6 +- jsaccess/README.txt | 16 +- jsaccess/doc/put_your_encrypted_files_here.txt | 6 +- jsaccess/jstore.sh | 300 ++++++++++++++++++++++++ jsaccess/store.sh | 303 ------------------------- jsaccess/tests/test_store.sh | 28 +-- 6 files changed, 327 insertions(+), 332 deletions(-) create mode 100755 jsaccess/jstore.sh delete mode 100755 jsaccess/store.sh (limited to 'jsaccess') diff --git a/jsaccess/Makefile b/jsaccess/Makefile index 41c1157..94062c9 100644 --- a/jsaccess/Makefile +++ b/jsaccess/Makefile @@ -1,11 +1,9 @@ PREFIX=/usr/local BINDIR=$(PREFIX)/bin -BINARIES=store.sh - all: - @echo "Run \"sudo make install\" to install store.sh" + @echo "Run \"sudo make install\" to install jstore" @echo "Run \"scp -rp jsa user@webserver:/var/www/htdocs/\" to install jsa on your web server" install: - install -m 0755 $(BINARIES) $(BINDIR) + install -m 0755 jstore.sh $(BINDIR)/jstore diff --git a/jsaccess/README.txt b/jsaccess/README.txt index 4127c1a..7d7292b 100644 --- a/jsaccess/README.txt +++ b/jsaccess/README.txt @@ -32,8 +32,8 @@ Deployment There are 2 parts: * The jsa/ directory that contains html / javascript files, for the user to access files list and download. jsa/store/ is the files store. -* The store.sh script for the web server owner to manage file store. -It is recomanded to run store.sh on your laptop, and then syncronise the +* The jstore script for the web server owner to manage file store. +It is recomanded to run jstore on your laptop, and then syncronise the jsa/store/ with your server. Put jsa/ directory on your web server, publicly available. @@ -44,7 +44,7 @@ Share a file 1. Add the file you want to share to the file store On your laptop: -$ ./store.sh add myfile +$ jstore add myfile # Then enter the passphase you want to use for encryption. # It will tell you something like: jsa/store/af022cd820fdad6cbcac8e15ac565c639a47dab0 @@ -54,9 +54,9 @@ UPDATED file jsa/store/af022cd820fdad6cbcac8e15ac565c639a47dab0/index.txt 2. Syncronise the file store with you online server On your laptop: # Set the rsync url (only once) -./store.sh rset user@myserver:/var/www/htdocs/jsa/store/ +jstore rset user@myserver:/var/www/htdocs/jsa/store/ # push the file store -./store.sh push +jstore push 3. Direct people to the directory jsa/, e.g. http://myserver.com/jsa/ @@ -64,7 +64,7 @@ On your laptop: How it works ============ -store.sh creates a directory jsa/store//. +jstore creates a directory jsa/store//. It encrypts your file using AES256 with the passphrase and stores the result in jsa/store//. It also updates the index of available files per directory called index.txt, @@ -82,7 +82,7 @@ Filesaver JS API. Dependencies / Compatibility ============================ -On the host that runs store.sh: +On the host that runs jstore: * openssl * base64 * optional: rsync, if you with to use ./store push to deploy your file store @@ -101,7 +101,7 @@ Git content jsa/ - should be on your webserver, can be renamed jsa/store// - directory of files to download for a given password jsa/store//index.txt - list of file name available -store.sh - to encrypt the files that will be available for download +jstore - to encrypt the files that will be available for download TODO diff --git a/jsaccess/doc/put_your_encrypted_files_here.txt b/jsaccess/doc/put_your_encrypted_files_here.txt index 3e2eb80..81eca5e 100644 --- a/jsaccess/doc/put_your_encrypted_files_here.txt +++ b/jsaccess/doc/put_your_encrypted_files_here.txt @@ -4,12 +4,12 @@ decrypted OK ! To a new file to download: -$ ./store.sh add README.txt +$ jstore add README.txt Using store "jsa/store" Enter encryption passphrase > jsa CREATED file /home/user/code/laurent-tools/jsaccess/jsa/store/af022cd820fdad6cbcac8e15ac565c639a47dab0/065e18a7f246b800242a778a6e8dd07a3321dac6 UPDATED file /home/user/code/laurent-tools/jsaccess/jsa/store/af022cd820fdad6cbcac8e15ac565c639a47dab0/index.txt -$ ./store.sh rset user@_host:/var/www/htdocs/jsa/ # Only the first time -$ ./store.sh push +$ jstore rset user@_host:/var/www/htdocs/jsa/ # Only the first time +$ jstore push diff --git a/jsaccess/jstore.sh b/jsaccess/jstore.sh new file mode 100755 index 0000000..ea19ea0 --- /dev/null +++ b/jsaccess/jstore.sh @@ -0,0 +1,300 @@ +#!/bin/sh + +# jsaccess - private web file sharing using client side crypto +# jstore.sh: file store manager for encrypting new files and deploy to server + +# Copyright (c) 2013 Laurent Ghigonis +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +VERSION=0.2 + +usage_exit() { + echo "jsaccess jstore.sh v$VERSION" + echo "usage: jstore.sh [-v] [action] [action arguments...] [store]" + echo + echo "actions on local store for a given passphrase:" + echo " ls [store] # default action if no arguments" + echo " add [store] # default action if one argument" + echo " rm [store]" + echo " rmall [store]" + echo + echo "actions on local store for all passphrases:" + echo " init " + echo " wipe " + echo + echo "actions to deploy local store to remote:" + echo " push [store]" + echo " rset [store]" + echo " rget [store]" + echo + echo "actions to get informations:" + echo " help|-h" + echo " version|-V" + echo + echo "By default store is ./store/ or ./jsa/store/" + echo "Use \"unset HISTFILE; export JSA_PASS=mypass\" to avoid typing the passphrase" + echo "Use \"unset JSA_PASS\" to forget the passphrase" + clean_exit 1 +} + +clean_exit() { + ret=9 + [ X"$1" != X"" ] && ret=$1 + rm -f $tmp + umask $sumask + exit $ret +} + +confirm_exit() { + if [ X"$JSA_FORCE" = X"" ]; then + echo -n "Are you sure ? [y/N] " + read r + [ X"$r" != X"y" ] && clean_exit 0 + fi +} + +_store_get() { + store="" + [[ -d ./jsa/store/ ]] && store="`readlink -f ./jsa/store/`" # priority 3 + [[ -d ./store/ ]] && store="`readlink -f ./store/`" # priority 2 + [[ X"$1" != X"" ]] && store=$1 # priority 1 + [[ -z $store ]] && echo "ERROR: store not found !" && \ + echo "Not specified as argument and local stores" \ + "./store/ or ./jsa/store/ not found" && clean_exit 1 + [[ ! -d $store ]] && echo "ERROR: specified store does not exist !" && \ + echo "Cannot access $store" && clean_exit 1 + echo "Using store \"$store\"" +} + +_pass_read() { + if [ X"$JSA_PASS" != X"" ]; then + pass=$JSA_PASS + else + echo "Enter encryption passphrase" + echo -n "> " + read pass + fi + [ -z $pass ] && echo "ERROR: empty passphrase" && clean_exit 1 + enc_dir_hash=`echo -n $pass |openssl rmd160 |cut -d' ' -f2` + enc_path="$store/$enc_dir_hash" +} + +_index_decrypt() { + if [ -f $enc_path/index.txt ]; then + echo -n $pass |openssl enc -d -a -aes-256-cbc -in $enc_path/index.txt -out $tmp -pass stdin ||clean_exit 2 + else + echo > $tmp + fi +} + +_index_encrypt() { + rm -f $enc_path/index.txt + echo -n $pass |openssl enc -e -a -aes-256-cbc -in $tmp -out $enc_path/index.txt -pass stdin ||clean_exit 2 + echo "UPDATED file $enc_path/index.txt" +} + +__file_get_encname() { + clear_name=$1 + enc_name=`echo -n ${enc_dir_hash}${clear_name} |openssl rmd160 |cut -d' ' -f2` +} + +_file_add() { + clear_path=$1 + clear_name=$2 + __file_get_encname $clear_name + if [ ! -d $enc_path ]; then + mkdir -p $enc_path + touch $enc_path/index.html + echo "CREATED directory $enc_path (new passphrase)" + fi + base64 -w0 $clear_path > $tmp ||clean_exit 2 + echo -n $pass |openssl enc -e -a -aes-256-cbc -in $tmp -out $enc_path/$enc_name -pass stdin ||clean_exit 2 + echo "CREATED file $enc_path/$enc_name" +} + +_file_rm() { + clear_name=$1 + __file_get_encname $clear_name + rm $enc_path/$enc_name ||clean_exit 1 + echo "DELETED file $enc_path/$enc_name" +} + +_rset() { + rsync_uri=$1 + if [ -f $store/.rsync_uri ]; then + echo "This will overwrite existing rsync_uri:" + cat $store/.rsync_uri + confirm_exit + fi + echo $rsync_uri > $store/.rsync_uri +} + +_rget() { + [ ! -f $store/.rsync_uri ] && echo "ERROR: no rsync_uri set !" && \ + echo "set it with \"jstore.sh rset $store\"" && \ + clean_exit 1 + rsync_uri=`cat $store/.rsync_uri` +} + +action_ls() { + _pass_read + _index_decrypt + [ ! -f $enc_path/index.txt ] && \ + echo "Passphrase not used in store !" && clean_exit 1 + echo "$enc_dir_hash/index.txt:" + cat $tmp +} + +action_add() { + clear_path=$1 + clear_name=`basename $clear_path` + _pass_read + _index_decrypt + if [ `egrep -c "^$clear_name$" $tmp` -ne 0 ]; then + echo "File already encrypted with this passphrase" + clean_exit 1 + fi + _file_add $clear_path $clear_name + _index_decrypt + echo $clear_name >> $tmp + _index_encrypt +} + +action_rm() { + clear_name=$1 + _pass_read + _index_decrypt + if [ `egrep -c "^$clear_name$" $tmp` -eq 0 ]; then + echo "File does not exist for this passphrase" + clean_exit 1 + fi + _file_rm $clear_name + _index_decrypt + sed -i /^$clear_name$/d $tmp + _index_encrypt +} + +action_rmall() { + _pass_read + echo "This will delete all file encrypted with this passphrase" + confirm_exit + rm -rf $enc_path + echo "DELETED directory $enc_path" +} + +action_init() { + store=$1 + mkdir $store ||clean_exit 1 + echo "The monster has emptied me !" > $store/index.html + echo "CREATED store \"$store\"" +} + +action_wipe() { + echo "This will delete all file encrypted with all passphrases" + confirm_exit + rm -rf $store + echo "DELETED store \"$store\"" +} + +action_rset() { + _rset $1 +} + +action_rget() { + _rget + echo "rsync_uri: $rsync_uri" +} + +action_push() { + _rget + cmd="rsync -avzP $store/* $rsync_uri" + echo "Running \"$cmd\"" + $cmd +} + +# Check for dependencies +if [ X"`which base64`" == X"" \ + -o X"`which openssl`" == X"" ]; then + echo "You need to have openssl and base64 available in your path !" + clean_exit 1 +fi + +# Initialize temporary stuff +sumask=$(umask) +umask 077 +tmp=`mktemp ./jsaXXXXXXXX` # Used for storing index / new files +trap clean_exit INT TERM + +# Run action +case $1 in +ls) + [ $# -ne 1 -a $# -ne 2 ] && usage_exit + _store_get $2 + action_ls + ;; +add) + [ $# -ne 2 -a $# -ne 3 ] && usage_exit + _store_get $3 + action_add $2 + ;; +rm) + [ $# -ne 2 -a $# -ne 3 ] && usage_exit + _store_get $3 + action_rm $2 + ;; +rmall) + [ $# -ne 1 -a $# -ne 2 ] && usage_exit + _store_get $2 + action_rmall + ;; +init) + [ $# -ne 2 ] && usage_exit + action_init $2 + ;; +wipe) + [ $# -ne 2 ] && usage_exit + _store_get $2 + action_wipe + ;; +push) + [ $# -ne 1 -a $# -ne 2 ] && usage_exit + _store_get $2 + action_push + ;; +rset) + [ $# -ne 2 -a $# -ne 3 ] && usage_exit + _store_get $3 + action_rset $2 + ;; +rget) + [ $# -ne 1 -a $# -ne 2 ] && usage_exit + _store_get $2 + action_rget + ;; +help|-h|version|-V) + usage_exit + ;; +"") + [ $# -ne 0 ] && usage_exit + _store_get + action_ls + ;; +*) + [ $# -ne 1 ] && usage_exit + _store_get $2 + action_add $1 +esac + +clean_exit 0 + diff --git a/jsaccess/store.sh b/jsaccess/store.sh deleted file mode 100755 index c6f49af..0000000 --- a/jsaccess/store.sh +++ /dev/null @@ -1,303 +0,0 @@ -#!/bin/sh - -# jsaccess - private web file sharing using client side crypto -# store.sh: file store manager for encrypting new files and deploy to server - -# Copyright (c) 2013 Laurent Ghigonis -# -# Permission to use, copy, modify, and distribute this software for any -# purpose with or without fee is hereby granted, provided that the above -# copyright notice and this permission notice appear in all copies. -# -# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -VERSION=0.2 - -usage_exit() { - echo "usage: store.sh [-v] [action] [action arguments...] [store]" - echo - echo "actions on local store for a given passphrase:" - echo " ls [store] # default action if no arguments" - echo " add [store] # default action if one argument" - echo " rm [store]" - echo " rmall [store]" - echo - echo "actions on local store for all passphrases:" - echo " init " - echo " wipe " - echo - echo "actions to deploy local store to remote:" - echo " push [store]" - echo " rset [store]" - echo " rget [store]" - echo - echo "actions to get informations:" - echo " help|-h" - echo " version|-V" - echo - echo "By default store is ./store/ or ./jsa/store/" - echo "Use \"unset HISTFILE; export JSA_PASS=mypass\" to avoid typing the passphrase" - echo "Use \"unset JSA_PASS\" to forget the passphrase" - clean_exit 1 -} - -clean_exit() { - ret=9 - [ X"$1" != X"" ] && ret=$1 - rm -f $tmp - umask $sumask - exit $ret -} - -confirm_exit() { - if [ X"$JSA_FORCE" = X"" ]; then - echo -n "Are you sure ? [y/N] " - read r - [ X"$r" != X"y" ] && clean_exit 0 - fi -} - -_store_get() { - store="" - [[ -d ./jsa/store/ ]] && store="`readlink -f ./jsa/store/`" # priority 3 - [[ -d ./store/ ]] && store="`readlink -f ./store/`" # priority 2 - [[ X"$1" != X"" ]] && store=$1 # priority 1 - [[ -z $store ]] && echo "ERROR: store not found !" && \ - echo "Not specified as argument and local stores" \ - "./store/ or ./jsa/store/ not found" && clean_exit 1 - [[ ! -d $store ]] && echo "ERROR: specified store does not exist !" && \ - echo "Cannot access $store" && clean_exit 1 - echo "Using store \"$store\"" -} - -_pass_read() { - if [ X"$JSA_PASS" != X"" ]; then - pass=$JSA_PASS - else - echo "Enter encryption passphrase" - echo -n "> " - read pass - fi - [ -z $pass ] && echo "ERROR: empty passphrase" && clean_exit 1 - enc_dir_hash=`echo -n $pass |openssl rmd160 |cut -d' ' -f2` - enc_path="$store/$enc_dir_hash" -} - -_index_decrypt() { - if [ -f $enc_path/index.txt ]; then - echo -n $pass |openssl enc -d -a -aes-256-cbc -in $enc_path/index.txt -out $tmp -pass stdin ||clean_exit 2 - else - echo > $tmp - fi -} - -_index_encrypt() { - rm -f $enc_path/index.txt - echo -n $pass |openssl enc -e -a -aes-256-cbc -in $tmp -out $enc_path/index.txt -pass stdin ||clean_exit 2 - echo "UPDATED file $enc_path/index.txt" -} - -__file_get_encname() { - clear_name=$1 - enc_name=`echo -n ${enc_dir_hash}${clear_name} |openssl rmd160 |cut -d' ' -f2` -} - -_file_add() { - clear_path=$1 - clear_name=$2 - __file_get_encname $clear_name - if [ ! -d $enc_path ]; then - mkdir -p $enc_path - touch $enc_path/index.html - echo "CREATED directory $enc_path (new passphrase)" - fi - base64 -w0 $clear_path > $tmp ||clean_exit 2 - echo -n $pass |openssl enc -e -a -aes-256-cbc -in $tmp -out $enc_path/$enc_name -pass stdin ||clean_exit 2 - echo "CREATED file $enc_path/$enc_name" -} - -_file_rm() { - clear_name=$1 - __file_get_encname $clear_name - rm $enc_path/$enc_name ||clean_exit 1 - echo "DELETED file $enc_path/$enc_name" -} - -_rset() { - rsync_uri=$1 - if [ -f $store/.rsync_uri ]; then - echo "This will overwrite existing rsync_uri:" - cat $store/.rsync_uri - confirm_exit - fi - echo $rsync_uri > $store/.rsync_uri -} - -_rget() { - [ ! -f $store/.rsync_uri ] && echo "ERROR: no rsync_uri set !" && \ - echo "set it with \"store.sh rset $store\"" && \ - clean_exit 1 - rsync_uri=`cat $store/.rsync_uri` -} - -action_ls() { - _pass_read - _index_decrypt - [ ! -f $enc_path/index.txt ] && \ - echo "Passphrase not used in store !" && clean_exit 1 - echo "$enc_dir_hash/index.txt:" - cat $tmp -} - -action_add() { - clear_path=$1 - clear_name=`basename $clear_path` - _pass_read - _index_decrypt - if [ `egrep -c "^$clear_name$" $tmp` -ne 0 ]; then - echo "File already encrypted with this passphrase" - clean_exit 1 - fi - _file_add $clear_path $clear_name - _index_decrypt - echo $clear_name >> $tmp - _index_encrypt -} - -action_rm() { - clear_name=$1 - _pass_read - _index_decrypt - if [ `egrep -c "^$clear_name$" $tmp` -eq 0 ]; then - echo "File does not exist for this passphrase" - clean_exit 1 - fi - _file_rm $clear_name - _index_decrypt - sed -i /^$clear_name$/d $tmp - _index_encrypt -} - -action_rmall() { - _pass_read - echo "This will delete all file encrypted with this passphrase" - confirm_exit - rm -rf $enc_path - echo "DELETED directory $enc_path" -} - -action_init() { - store=$1 - mkdir $store ||clean_exit 1 - echo "The monster has emptied me !" > $store/index.html - echo "CREATED store \"$store\"" -} - -action_wipe() { - echo "This will delete all file encrypted with all passphrases" - confirm_exit - rm -rf $store - echo "DELETED store \"$store\"" -} - -action_rset() { - _rset $1 -} - -action_rget() { - _rget - echo "rsync_uri: $rsync_uri" -} - -action_push() { - _rget - cmd="rsync -avzP $store/* $rsync_uri" - echo "Running \"$cmd\"" - $cmd -} - -# Check for dependencies -if [ X"`which base64`" == X"" \ - -o X"`which openssl`" == X"" ]; then - echo "You need to have openssl and base64 available in your path !" - clean_exit 1 -fi - -# Initialize temporary stuff -sumask=$(umask) -umask 077 -tmp=`mktemp ./jsaXXXXXXXX` # Used for storing index / new files -trap clean_exit INT TERM - -# Run action -case $1 in -ls) - [ $# -ne 1 -a $# -ne 2 ] && usage_exit - _store_get $2 - action_ls - ;; -add) - [ $# -ne 2 -a $# -ne 3 ] && usage_exit - _store_get $3 - action_add $2 - ;; -rm) - [ $# -ne 2 -a $# -ne 3 ] && usage_exit - _store_get $3 - action_rm $2 - ;; -rmall) - [ $# -ne 1 -a $# -ne 2 ] && usage_exit - _store_get $2 - action_rmall - ;; -init) - [ $# -ne 2 ] && usage_exit - action_init $2 - ;; -wipe) - [ $# -ne 2 ] && usage_exit - _store_get $2 - action_wipe - ;; -push) - [ $# -ne 1 -a $# -ne 2 ] && usage_exit - _store_get $2 - action_push - ;; -rset) - [ $# -ne 2 -a $# -ne 3 ] && usage_exit - _store_get $3 - action_rset $2 - ;; -rget) - [ $# -ne 1 -a $# -ne 2 ] && usage_exit - _store_get $2 - action_rget - ;; -help|-h) - usage_exit - ;; -version|-V) - echo "v$VERSION" - usage_exit - ;; -"") - [ $# -ne 0 ] && usage_exit - _store_get - action_ls - ;; -*) - [ $# -ne 1 ] && usage_exit - _store_get $2 - action_add $1 -esac - -clean_exit 0 - diff --git a/jsaccess/tests/test_store.sh b/jsaccess/tests/test_store.sh index c22ce26..70e44f5 100755 --- a/jsaccess/tests/test_store.sh +++ b/jsaccess/tests/test_store.sh @@ -1,8 +1,8 @@ #!/bin/sh -# Unittests for jsaccess store.sh +# Unittests for jsaccess jstore.sh -storesh=../store.sh +jstoresh=../jstore.sh TMP=test_store.tmp export JSA_PASS=jsa_unittest_passphrase export JSA_FORCE=1 @@ -10,54 +10,54 @@ export JSA_FORCE=1 echo echo "=== INIT ===" -$storesh init store ||exit 1 +$jstoresh init store ||exit 1 [ -d store ] ||exit 2 echo echo "=== LOCAL ===" -$storesh add example.txt ||exit 10 +$jstoresh add example.txt ||exit 10 [ -d ./store/ad2c5eb7c4fca722235f5df80e11fa619adbd533/ ] ||exit 11 [ -f ./store/ad2c5eb7c4fca722235f5df80e11fa619adbd533/8e895f3f4317fb442747a40b9025d6ad8c9c8cf3 ] ||exit 12 -$storesh ls > $TMP ||exit 20 +$jstoresh ls > $TMP ||exit 20 [ `grep -c "example.txt" $TMP` -eq 1 ] || exit 21 rm $TMP -$storesh rm example.txt ||exit 30 +$jstoresh rm example.txt ||exit 30 [ ! -f ./store/ad2c5eb7c4fca722235f5df80e11fa619adbd533/8e895f3f4317fb442747a40b9025d6ad8c9c8cf3 ] ||exit 31 -$storesh ls > $TMP ||exit 40 +$jstoresh ls > $TMP ||exit 40 [ `grep -c "example.txt" $TMP` -eq 0 ] || exit 41 rm $TMP -$storesh add example.txt ||exit 50 +$jstoresh add example.txt ||exit 50 [ -d ./store/ad2c5eb7c4fca722235f5df80e11fa619adbd533/ ] ||exit 51 [ -f ./store/ad2c5eb7c4fca722235f5df80e11fa619adbd533/8e895f3f4317fb442747a40b9025d6ad8c9c8cf3 ] ||exit 52 -$storesh rmall ||exit 60 +$jstoresh rmall ||exit 60 [ ! -d ./store/ad2c5eb7c4fca722235f5df80e11fa619adbd533/ ] ||exit 61 -$storesh add example.txt ||exit 70 +$jstoresh add example.txt ||exit 70 [ -d ./store/ad2c5eb7c4fca722235f5df80e11fa619adbd533/ ] ||exit 71 [ -f ./store/ad2c5eb7c4fca722235f5df80e11fa619adbd533/8e895f3f4317fb442747a40b9025d6ad8c9c8cf3 ] ||exit 72 echo echo "=== DEPLOY ===" -$storesh rset clone_store ||exit 100 +$jstoresh rset clone_store ||exit 100 echo clone_store |diff -u - ./store/.rsync_uri ||exit 101 -$storesh rget > $TMP ||exit 110 +$jstoresh rget > $TMP ||exit 110 [ `grep -c "rsync_uri: clone_store" $TMP` -eq 1 ] || exit 21 -$storesh push ||exit 120 +$jstoresh push ||exit 120 [ -f ./clone_store/ad2c5eb7c4fca722235f5df80e11fa619adbd533/8e895f3f4317fb442747a40b9025d6ad8c9c8cf3 ] ||exit 121 echo echo "=== WIPE ===" -$storesh wipe store ||exit 200 +$jstoresh wipe store ||exit 200 [ ! -d store ] ||exit 201 rm -rf ./clone_store/ -- cgit v1.2.3-59-g8ed1b