diff --git a/install b/install index 3559468..9fbdc85 100755 --- a/install +++ b/install @@ -3,20 +3,14 @@ # Functions mkconfig(){ echo "Please get your credentials from https://my.telegram.org." + echo "See readme.md for more info." read -p "App API ID (api_id): " api_id read -p "App API hash (api_hash): " api_hash read -p "Your user ID: " myid - read -p "Do you wish to use a log chat? (y/n): " logrpl - if [ "$logrpl" = "y" ] - then - read -p "Log chat ID (logchat): " logchat - else - logchat="'me'" - fi + echo "api_id = $api_id" >> config.py echo "api_hash = '$api_hash'" >> config.py echo "myid = $myid" >> config.py - echo "logchat = $logchat" >> config.py } # Preliminary sanity checks @@ -25,7 +19,6 @@ mkconfig(){ [ $0 != ./install ] && echo "Not launched from current directory." && exit 1 [ ! -f config.py ] && mkconfig -git pull pip3 install -U telethon --user - +[ -f setup.py ] && python3 setup.py return 0