add alias to blockstack-core with deprecation warning (blockstack-server becomes blockstack-core)

This commit is contained in:
Jude Nelson
2017-02-27 11:25:33 -05:00
parent fdafe79e79
commit b48022efa1

View File

@@ -1,42 +1,5 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Blockstack
~~~~~
copyright: (c) 2014-2015 by Halfmoon Labs, Inc.
copyright: (c) 2016 by Blockstack.org
#!/bin/sh
This file is part of Blockstack
echo "This command is DEPRECATED. Please use \`blockstack-core\` in the future."
Blockstack is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Blockstack is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Blockstack. If not, see <http://www.gnu.org/licenses/>.
"""
import sys
import os
if sys.version_info.major != 2:
raise Exception("Python 3 is not supported")
if sys.version_info.minor < 7:
raise Exception("Python 2.7 or greater is required")
# Hack around absolute paths
current_dir = os.path.abspath(os.path.dirname(__file__))
parent_dir = os.path.abspath(current_dir + "/../")
sys.path.insert(0, parent_dir)
from blockstack.blockstackd import run_blockstackd
if __name__ == '__main__':
run_blockstackd()
exec blockstack-core $@