Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
mkg20001 committed Nov 20, 2016
1 parent 10831ac commit 86c4c9e
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 25 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
test:
install:
sudo snap install --force-dangerous zero*.snap
install-dev:
sudo snap install --force-dangerous --devmode zero*.snap
cleanbuild:
snapcraft cleanbuild
Expand Down
21 changes: 21 additions & 0 deletions scripts/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env python2.7


# Included modules
import os

# ZeroNet Modules
import zeronet

def mkdirp(directory):
if not os.path.exists(directory):
os.makedirs(directory)

def main():
mkdirp(os.environ['SNAP_USER_DATA']+"/data")
mkdirp(os.environ['SNAP_USER_DATA']+"/log")
os.chdir(os.environ['SNAP'])
zeronet.main()

if __name__ == '__main__':
main()
11 changes: 0 additions & 11 deletions scripts/zeronet.sh

This file was deleted.

22 changes: 9 additions & 13 deletions snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: zeronet
version: 0.0.1
version: 0.5.1-a0
summary: Open, free and uncensorable websites, using Bitcoin and BitTorrent
description: |
Decentralized websites using Bitcoin crypto and the BitTorrent network - https://zeronet.io
Expand All @@ -11,11 +11,11 @@ description: |
Fast and works offline: You can access the site even if Internet is unavailable.
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots
confinement: strict

apps:
zeronet:
command: bash $SNAP/zero/ZeroNet.sh
command: zero/Python/python $SNAP/main.py --data_dir $SNAP_USER_DATA/data --log_dir $SNAP_USER_DATA/data
plugs: [network,network-bind]
env:
command: env
Expand All @@ -36,18 +36,14 @@ parts:
source-branch: master
source-type: git
snap:
- zeronet
- src
- tools
- plugins
- zeronet.py
- start.py
plugin: dump
organize:
src: zeronet/src
tools: zeronet/tools
plugins: zeronet/plugins
zeronet.py: zeronet/zeronet.py
start.py: zeronet/start.py
scripts:
source: scripts
plugin: dump
snap:
- zero
organize:
zeronet.sh: zero/ZeroNet.sh
- main.py

0 comments on commit 86c4c9e

Please sign in to comment.