Commit 706aaf9a authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm play: add --ipfs support

parent 3e5f05e8
...@@ -123,6 +123,9 @@ pkg_urls= ...@@ -123,6 +123,9 @@ pkg_urls=
quoted_args= quoted_args=
direct_args= direct_args=
eget_backend=$EGET_BACKEND
eget_ipfs_db=/var/lib/eepm/eget-ipfs-db.txt
# load system wide config # load system wide config
[ -f $CONFIGDIR/eepm.conf ] && . $CONFIGDIR/eepm.conf [ -f $CONFIGDIR/eepm.conf ] && . $CONFIGDIR/eepm.conf
......
...@@ -351,6 +351,19 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ] ; then ...@@ -351,6 +351,19 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ] ; then
exit exit
fi fi
if [ "$1" = "--ipfs" ] ; then
shift
if [ -d "$(dirname "$epm_ipfs_db")" ] ; then
export EGET_IPFS_DB="$eget_ipfs_db"
if [ ! -r "$EGET_IPFS_DB" ] ; then
sudorun touch "$EGET_IPFS_DB"
sudorun chmod -v a+rw "$EGET_IPFS_DB"
fi
else
warning "ipfs db dir $eget_ipfs_db is not exists, skipping --ipfs"
fi
fi
if [ "$1" = "--remove" ] || [ "$1" = "remove" ] ; then if [ "$1" = "--remove" ] || [ "$1" = "remove" ] ; then
shift shift
......
...@@ -27,3 +27,6 @@ ...@@ -27,3 +27,6 @@
#full_upgrade_no_flatpack=1 #full_upgrade_no_flatpack=1
#full_upgrade_no_snap=1 #full_upgrade_no_snap=1
#full_upgrade_no_kernel_update=1 #full_upgrade_no_kernel_update=1
# own path for eget ipfs database
#eget_ipfs_db=/var/lib/eepm/eget-ipfs-db.txt
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment