2020-02-12 00:51:13 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-02-26 07:11:49 +00:00
|
|
|
xxh_home_realpath=`realpath -m _xxh_home_`
|
2020-02-12 00:51:13 +00:00
|
|
|
|
2020-02-16 12:59:06 +00:00
|
|
|
xxh_version='dir_not_found'
|
|
|
|
if [[ -d $xxh_home_realpath ]]; then
|
|
|
|
xxh_version=`[ "$(ls -A $xxh_home_realpath)" ] && echo "version_not_found" || echo "dir_empty"`
|
2020-03-06 18:33:49 +00:00
|
|
|
settings_path=$xxh_home_realpath/xxh/package/settings.py
|
2020-02-16 12:59:06 +00:00
|
|
|
if [[ -f $settings_path ]]; then
|
|
|
|
xxh_version=`cat $settings_path | grep XXH_VERSION | sed -e "s/.*: '\(.*\)'/\\1/g"`
|
|
|
|
fi
|
2020-02-12 00:51:13 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
echo xxh_home_realpath=$xxh_home_realpath
|
|
|
|
echo xxh_version=$xxh_version
|
2020-02-16 12:59:06 +00:00
|
|
|
echo xxh_home_writable=`[ -w $xxh_home_realpath ] && echo "1" ||echo "0"`
|
|
|
|
echo xxh_parent_home_writable=`[ -w $(dirname $xxh_home_realpath) ] && echo "1" ||echo "0"`
|
2020-02-12 19:10:48 +00:00
|
|
|
echo rsync=`command -v rsync`
|
2020-02-13 19:16:03 +00:00
|
|
|
echo scp=`command -v scp`
|