# This patch file was generated by NetBeans IDE # Following Index: paths are relative to: /home/lighta/Documents/Myscript/RO/Servs/rathena # This patch can be applied using context Tools: Patch action on respective folder. # It uses platform neutral UTF-8 encoding and \n newlines. # Above lines and this line are ignored by the patching process. Index: Makefile.in --- Makefile.in Base (BASE) +++ Makefile.in Locally Modified (Based On LOCAL) @@ -2,13 +2,12 @@ HAVE_MYSQL=@HAVE_MYSQL@ ifeq ($(HAVE_MYSQL),yes) - ALL_DEPENDS=common_sql login_sql char_sql map_sql tools import - SQL_DEPENDS=common_sql login_sql char_sql map_sql import + ALL_DEPENDS=sql tools + SQL_DEPENDS=common_sql login_sql char_sql map_sql import test COMMON_SQL_DEPENDS=mt19937ar libconfig LOGIN_SQL_DEPENDS=mt19937ar libconfig common_sql CHAR_SQL_DEPENDS=mt19937ar libconfig common_sql MAP_SQL_DEPENDS=mt19937ar libconfig common_sql - CONVERTERS_DEPENDS=common_sql else ALL_DEPENDS=needs_mysql SQL_DEPENDS=needs_mysql @@ -20,7 +19,7 @@ ##################################################################### -.PHONY: sql \ +.PHONY: all sql \ common_sql \ mt19937ar \ login_sql \ @@ -29,7 +28,8 @@ tools \ import \ test \ - clean help + clean help \ + install uninstall bin-clean \ all: $(ALL_DEPENDS) @@ -38,12 +38,6 @@ common_sql: $(COMMON_SQL_DEPENDS) @$(MAKE) -C src/common sql -mt19937ar: - @$(MAKE) -C 3rdparty/mt19937ar - -libconfig: - @$(MAKE) -C 3rdparty/libconfig - login_sql: $(LOGIN_SQL_DEPENDS) @$(MAKE) -C src/login sql @@ -53,6 +47,12 @@ map_sql: $(MAP_SQL_DEPENDS) @$(MAKE) -C src/map sql +mt19937ar: + @$(MAKE) -C 3rdparty/mt19937ar + +libconfig: + @$(MAKE) -C 3rdparty/libconfig + tools: @$(MAKE) -C src/tool @@ -94,46 +94,22 @@ @echo " 'map_sql' and 'import')" @echo "'test' - builds tests" @echo "'clean' - cleans builds and objects" + @echo "'install' - run installer wich setup rathena in /opt/" + @echo "'bin-clean' - delete binary installed" + @echo "'uninstall' - run uninstaller wich erase all install change" @echo "'help' - outputs this message" -##################################################################### - needs_mysql: @echo "MySQL not found or disabled by the configure script" @exit 1 -##################################################################### -# TODO +install: + @sh ./install.sh -install: conf/%.conf conf/%.txt - $(shell read -p "WARNING: This target does not work properly yet. Press Ctrl+C to cancel or Enter to continue.") - $(shell mkdir -p /opt/rathena/bin/) - $(shell mkdir -p /opt/rathena/etc/rathena/) - $(shell mkdir -p /opt/rathena/var/log/rathena/) - $(shell mv save /opt/rathena/etc/rathena/save) - $(shell mv db /opt/rathena/etc/rathena/db) - $(shell mv conf /opt/rathena/etc/rathena/conf) - $(shell mv npc /opt/rathena/etc/rathena/npc) - $(shell mv log/* /opt/rathena/var/log/rathena/) - $(shell cp *-server* /opt/rathena/bin/) - $(shell ln -s /opt/rathena/etc/rathena/save/ /opt/rathena/bin/) - $(shell ln -s /opt/rathena/etc/rathena/db/ /opt/rathena/bin/) - $(shell ln -s /opt/rathena/etc/rathena/conf/ /opt/rathena/bin/) - $(shell ln -s /opt/rathena/etc/rathena/npc/ /opt/rathena/bin/) - $(shell ln -s /opt/rathena/var/log/rathena/ /opt/rathena/bin/log) - bin-clean: - $(shell rm /opt/rathena/bin/login-server*) - $(shell rm /opt/rathena/bin/char-server*) - $(shell rm /opt/rathena/bin/map-server*) + @sh ./uninstall.sh bin uninstall: - $(shell read -p "WARNING: This target does not work properly yet. Press Ctrl+C to cancel or Enter to continue.") - bin-clean - $(shell rm /opt/rathena/bin/save) - $(shell rm /opt/rathena/bin/db) - $(shell rm /opt/rathena/bin/conf) - $(shell rm /opt/rathena/bin/npc) - $(shell rm /opt/rathena/bin/log) - $(shell rm -rf /opt/rathena/etc/rathena) - $(shell rm -rf /opt/rathena/var/log/rathena) + @sh ./uninstall.sh all + +##################################################################### Index: athena-start --- athena-start Base (BASE) +++ athena-start Locally Modified (Based On LOCAL) @@ -1,72 +1,119 @@ #!/bin/sh -# athena starting script by rowla -# modified by shazeya@syafi.com (NL101541) -PATH=./:$PATH +#source var/function +. ./function.sh +inst_launch_workaround -L_SRV=login-server_sql -C_SRV=char-server_sql -M_SRV=map-server_sql - +PATH=./:$PATH print_start() { # more << EOF echo "Athena Starting..." -echo " (c) 2003 Athena Project" -echo " modified by shazeya@syafi.com" + echo " (c) 2013 rAthena Project" echo "" -#echo "Debug informations will appear," -#echo "since this is a test release." -#echo "" + echo "" echo "checking..." #EOF } -check_files() { +get_status(){ + PIDFILE=.$1.pid + if [ -e ${PIDFILE} ]; then + ISRUN=$(ps ax | grep $(cat ${PIDFILE}) | grep $1) + PSRUN=$(echo "$ISRUN" | awk '{ print substr( $0, 0, 7) }') + fi + return $PSRUN +} - for i in ${L_SRV} ${C_SRV} ${M_SRV} - do - if [ ! -f ./$i ]; then - echo "$i does not exist, or can't run." - echo "Stop. Check your compile." - exit 1; +#cheking if already started, launch and mark in log +start_serv(){ + LOGFILE="log/$1.log" + get_status $1 + echo "My logfile=${LOGFILE}" + if [ -z ${PSRUN} ]; then + exec ./$1& + echo $! > .$1.pid + echo "Server '$1' started at `date +"%m-%d-%H:%M-%S"`" + echo "Server '$1' started at `date +"%m-%d-%H:%M-%S"`" >> ${LOGFILE} + else + echo "Can't start '$1', cause is already running p${PSRUN}" + echo "Can't start '$1', cause is already running p${PSRUN}" >> ${LOGFILE} fi +} + +#experimental +watch_serv(){ + LOGFILE=./log/$1.log + ulimit -Sc unlimited + + while true; do + get_status $1 + if [ -z ${PSRUN} ]; then + $count=$count+1 + echo "server '$1' is down" >> ${LOGFILE} + echo "restarting server at time at `date +"%m-%d-%H:%M-%S"`">> ${LOGFILE} + exec ./$1& + echo $! > .$1.pid + if [ $3 ] && [ $3 -lt $count ]; then break; fi + else sleep $2 + fi done +} -# more << EOF -echo "Check complete." -echo "Looks good, a nice Athena!" -#EOF +restart(){ + $0 stop + for i in ${L_SRV} ${C_SRV} ${M_SRV} + do + while true; do + get_status ${i} + if [ ${PSRUN} ]; then echo "'${i}' is still running p${PSRUN} waiting end"; sleep 2; + else break; fi + done + done + $0 start } - case $1 in 'start') print_start check_files - - exec ./${L_SRV}& - echo $! > .${L_SRV}.pid - exec ./${C_SRV}& - echo $! > .${C_SRV}.pid - exec ./${M_SRV}& - echo $! > .${M_SRV}.pid - + echo "Check complete." + echo "Looks good, a nice Athena!" + for i in ${L_SRV} ${C_SRV} ${M_SRV} + do + start_serv $i + done echo "Now Started Athena." ;; + 'watch') + for i in ${L_SRV} ${C_SRV} ${M_SRV} + do + watch_serv $i 10 3 + done + echo "Now watching Athena." +;; 'stop') - for i in .${L_SRV}.pid .${C_SRV}.pid .${M_SRV}.pid + for i in ${L_SRV} ${C_SRV} ${M_SRV} do - if [ -e ./$i ]; then - kill $(cat $i) - rm $i + PIDFILE=.${i}.pid + if [ -e ./${PIDFILE} ]; then + kill $(cat ${PIDFILE}) + rm ${PIDFILE} fi done ;; 'restart') - $0 stop - $0 start + restart ;; + 'status') + for i in ${L_SRV} ${C_SRV} ${M_SRV} + do + get_status ${i} + if [ ${PSRUN} ]; then echo "'${i}' is running p${PSRUN}"; else echo "'${i}' seem down"; fi + done +;; *) - echo "Usage: athena-start { start | stop | restart }" + echo "Usage: athena-start { start | stop | restart | status | watch }" ;; esac + + Index: char-server.sh --- char-server.sh Base (BASE) +++ char-server.sh Locally Deleted @@ -1,16 +0,0 @@ -#/bin/sh -#Hi my naem is Kirt and I liek anime - -ulimit -Sc unlimited - -while [ 3 ] ; do -if [ -f .stopserver3 ] ; then -echo server marked down >> servlog.txt -else -echo restarting server at time at `date +"%m-%d-%H:%M-%S"`>> startlog.txt -./char-server_sql -fi - -sleep 5 - -done Index: configure --- configure Base (BASE) +++ configure Locally Modified (Based On LOCAL) @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 17061 . +# From configure.in Revision: 17159 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.68. # @@ -5886,9 +5886,9 @@ $as_echo "$as_me: ignoring PCRE (optional)" >&6;} else host_os="`uname`" - if test "$host_os" = "FreeBSD" ; then PCRE_HOME="/usr/local"; fi - { $as_echo "$as_me:${as_lineno-$LINENO}: bsddebug, pcrehome=($PCRE_HOME)" >&5 -$as_echo "$as_me: bsddebug, pcrehome=($PCRE_HOME)" >&6;} + if test "$host_os" = "FreeBSD" ; then + if test -z "$PCRE_HOME" ; then PCRE_HOME="/usr/local"; fi + fi if test -z "$PCRE_HOME" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pcre_study" >&5 $as_echo_n "checking for library containing pcre_study... " >&6; } Index: configure.in --- configure.in Base (BASE) +++ configure.in Locally Modified (Based On LOCAL) @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_INIT(rAthena) -AC_REVISION($Revision$) +AC_REVISION($Revision: 17159 $) AC_PREREQ([2.59]) AC_CONFIG_SRCDIR([src/common/cbasetypes.h]) AC_CONFIG_FILES([Makefile src/common/Makefile]) @@ -780,8 +780,9 @@ AC_MSG_NOTICE([ignoring PCRE (optional)]) else host_os="`uname`" - if test "$host_os" = "FreeBSD" ; then PCRE_HOME="/usr/local"; fi - AC_MSG_NOTICE([bsddebug, pcrehome=($PCRE_HOME)]) + if test "$host_os" = "FreeBSD" ; then + if test -z "$PCRE_HOME" ; then PCRE_HOME="/usr/local"; fi + fi if test -z "$PCRE_HOME" ; then AC_SEARCH_LIBS([pcre_study], [pcre], [HAVE_PCRE="yes"], []) if test "$HAVE_PCRE" = "yes" ; then Index: function.sh --- function.sh No Base Revision +++ function.sh Locally New @@ -0,0 +1,26 @@ +L_SRV=login-server_sql +C_SRV=char-server_sql +M_SRV=map-server_sql +INST_PATH=/opt +PKG=rathena +PKG_PATH=$INST_PATH/$PKG + +check_files() { + for i in ${L_SRV} ${C_SRV} ${M_SRV} + do + if [ ! -f ./$i ]; then + echo "$i does not exist extiting" + exit 1; + fi + done +} + +check_inst_right(){ + if [ ! -w $INST_PATH ]; then echo "You must have sudo right to use this install (writte/read permission in /opt/ )" && exit; fi +} + +inst_launch_workaround(){ + if [ -d $PKG_PATH ]; then + if [ $(pwd) != $PKG_PATH ]; then cd $PKG_PATH; fi + fi +} Index: install.sh --- install.sh No Base Revision +++ install.sh Locally New @@ -0,0 +1,25 @@ +#!/bin/sh +#source var/function +. ./function.sh + +check_inst_right +check_files +read -p "WARNING: This target dis experimental. Press Ctrl+C to cancel or Enter to continue." readEnterKey +mkdir -p $PKG_PATH/bin/ +mkdir -p $PKG_PATH/etc/$PKG/ +mkdir -p $PKG_PATH/var/$PKG/ + +#we copy all file into opt/ dir and treat dir like normal unix arborescence +rsync -r --exclude .svn db/ $PKG_PATH/var/$PKG/db +rsync -r --exclude .svn log/ $PKG_PATH/var/$PKG/log +rsync -r --exclude .svn conf/ $PKG_PATH/etc/$PKG/conf +rsync -r --exclude .svn npc/ $PKG_PATH/npc +cp athena-start $PKG_PATH/ +mv *-server* $PKG_PATH/bin/ + +ln -fs $PKG_PATH/var/$PKG/db/ $PKG_PATH/db +ln -fs $PKG_PATH/var/$PKG/log/ $PKG_PATH/log +ln -fs $PKG_PATH/etc/$PKG/conf/ $PKG_PATH/conf +ln -fs $PKG_PATH/athena-start /usr/bin/$PKG +for f in $(ls $PKG_PATH/bin/) ; do ln -fs $PKG_PATH/bin/$f $PKG_PATH/$f; done +echo "Installation is done you can now control server with '$PKG start'" Index: login-server.sh --- login-server.sh Base (BASE) +++ login-server.sh Locally Deleted @@ -1,16 +0,0 @@ -#/bin/sh -#Hi my naem is Kirt and I liek anime - -ulimit -Sc unlimited - -while [ 2 ] ; do -if [ -f .stopserver2 ] ; then -echo server marked down >> servlog.txt -else -echo restarting server at time at `date +"%m-%d-%H:%M-%S"`>> startlog.txt -./login-server_sql -fi - -sleep 5 - -done Index: map-server.sh --- map-server.sh Base (BASE) +++ map-server.sh Locally Deleted @@ -1,16 +0,0 @@ -#/bin/sh -#Hi my naem is Kirt and I liek anime - -ulimit -Sc unlimited - -while [ 1 ] ; do -if [ -f .stopserver ] ; then -echo server marked down >> servlog.txt -else -echo restarting server at time at `date +"%m-%d-%H:%M-%S"`>> startlog.txt -./map-server_sql -fi - -sleep 5 - -done Index: src/char/Makefile.in --- src/char/Makefile.in Base (BASE) +++ src/char/Makefile.in Locally Modified (Based On LOCAL) @@ -21,35 +21,38 @@ HAVE_MYSQL=@HAVE_MYSQL@ ifeq ($(HAVE_MYSQL),yes) - CHAR_SERVER_SQL_DEPENDS=obj_sql $(CHAR_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a $(MT19937AR_OBJ) + SQL_DEPENDS=char-server_sql else - CHAR_SERVER_SQL_DEPENDS=needs_mysql + SQL_DEPENDS=needs_mysql endif +ALL_DEPENDS=sql @SET_MAKE@ ##################################################################### -.PHONY : all char-server_sql clean help +.PHONY : all sql clean help -all: char-server_sql +all: $(ALL_DEPENDS) -char-server_sql: $(CHAR_SERVER_SQL_DEPENDS) - @echo " LD $@" - @@CC@ @LDFLAGS@ -o ../../char-server_sql@EXEEXT@ $(CHAR_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@ +sql: $(SQL_DEPENDS) clean: @echo " CLEAN char" @rm -rf *.o obj_sql ../../char-server_sql@EXEEXT@ help: - @echo "possible targets are 'char-server_sql' 'all' 'clean' 'help'" - @echo "'char-server_sql' - char server (SQL version)" + @echo "possible targets are 'sql' 'all' 'clean' 'help'" + @echo "'sql' - char server (SQL version)" @echo "'all' - builds all above targets" @echo "'clean' - cleans builds and objects" @echo "'help' - outputs this message" ##################################################################### +char-server_sql: obj_sql $(CHAR_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a $(MT19937AR_OBJ) + @echo " LD $@" + @@CC@ @LDFLAGS@ -o ../../char-server_sql@EXEEXT@ $(CHAR_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@ + needs_mysql: @echo "MySQL not found or disabled by the configure script" @exit 1 Index: src/common/Makefile.in --- src/common/Makefile.in Base (BASE) +++ src/common/Makefile.in Locally Modified (Based On LOCAL) @@ -24,11 +24,11 @@ HAVE_MYSQL=@HAVE_MYSQL@ ifeq ($(HAVE_MYSQL),yes) - ALL_DEPENDS=sql SQL_DEPENDS=common common_sql else SQL_DEPENDS=needs_mysql endif +ALL_DEPENDS=sql @SET_MAKE@ Index: src/common/core.c --- src/common/core.c Base (BASE) +++ src/common/core.c Locally Modified (Based On LOCAL) @@ -5,13 +5,13 @@ #include "showmsg.h" #include "malloc.h" #include "core.h" +#include "sql.h" #ifndef MINICORE #include "db.h" #include "socket.h" #include "timer.h" #include "thread.h" #include "mempool.h" -#include "sql.h" #include "cbasetypes.h" #include "msg_conf.h" #endif Index: src/login/Makefile.in --- src/login/Makefile.in Base (BASE) +++ src/login/Makefile.in Locally Modified (Based On LOCAL) @@ -19,19 +19,20 @@ HAVE_MYSQL=@HAVE_MYSQL@ ifeq ($(HAVE_MYSQL),yes) - LOGIN_SERVER_SQL_DEPENDS=obj_sql $(LOGIN_SQL_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a $(MT19937AR_OBJ) + SQL_DEPENDS=login-server_sql else - LOGIN_SERVER_SQL_DEPENDS=needs_mysql + SQL_DEPENDS=needs_mysql endif +ALL_DEPENDS= sql @SET_MAKE@ ##################################################################### .PHONY :all sql clean help -all: sql +all: $(ALL_DEPENDS) -sql: obj_sql login-server_sql +sql: $(SQL_DEPENDS) clean: @echo " CLEAN login" @@ -58,7 +59,7 @@ #executables -login-server_sql: $(LOGIN_SERVER_SQL_DEPENDS) +login-server_sql: obj_sql $(LOGIN_SQL_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a $(MT19937AR_OBJ) @echo " LD $@" @@CC@ @LDFLAGS@ -o ../../login-server_sql@EXEEXT@ $(LOGIN_SQL_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@ Index: src/map/Makefile.in --- src/map/Makefile.in Base (BASE) +++ src/map/Makefile.in Locally Modified (Based On LOCAL) @@ -31,13 +31,11 @@ HAVE_MYSQL=@HAVE_MYSQL@ ifeq ($(HAVE_MYSQL),yes) - ALL_DEPENDS=txt sql SQL_DEPENDS=map-server_sql else - ALL_TARGET=txt SQL_DEPENDS=needs_mysql endif -TXT_DEPENDS=map-server +ALL_DEPENDS=sql HAVE_PCRE=@HAVE_PCRE@ ifeq ($(HAVE_PCRE),yes) @@ -49,12 +47,10 @@ @SET_MAKE@ ##################################################################### -.PHONY : all txt sql clean help +.PHONY : all sql clean help all: $(ALL_DEPENDS) -txt: $(TXT_DEPENDS) - sql: $(SQL_DEPENDS) clean: @@ -62,13 +58,8 @@ @rm -rf *.o obj_txt obj_sql ../../map-server@EXEEXT@ ../../map-server_sql@EXEEXT@ help: -ifeq ($(HAVE_MYSQL),yes) @echo "possible targets are 'sql' 'txt' 'all' 'clean' 'help'" @echo "'sql' - map server (SQL version)" -else - @echo "possible targets are 'txt' 'all' 'clean' 'help'" -endif - @echo "'txt' - map server (TXT version)" @echo "'all' - builds all above targets" @echo "'clean' - cleans builds and objects" @echo "'help' - outputs this message" @@ -80,9 +71,6 @@ @exit 1 # object directories -obj_txt: - @echo " MKDIR obj_txt" - @-mkdir obj_txt obj_sql: @echo " MKDIR obj_sql" Index: src/map/map.c --- src/map/map.c Base (BASE) +++ src/map/map.c Locally Modified (Based On LOCAL) @@ -106,8 +106,8 @@ static struct block_list *bl_list[BL_LIST_MAX]; static int bl_list_count = 0; -#define MAX_MSG 1500 -static char* msg_table[MAX_MSG]; // map Server messages +#define MAP_MAX_MSG 1500 +static char* msg_table[MAP_MAX_MSG]; // map Server messages struct map_data map[MAX_MAP_PER_SERVER]; int map_num = 0; @@ -3838,11 +3838,11 @@ } int map_msg_config_read(char *cfgName){ - return _msg_config_read(cfgName,MAX_MSG,msg_table); + return _msg_config_read(cfgName,MAP_MAX_MSG,msg_table); } const char* map_msg_txt(int msg_number){ - return _msg_txt(msg_number,MAX_MSG,msg_table); + return _msg_txt(msg_number,MAP_MAX_MSG,msg_table); } void map_do_final_msg(void){ - _do_final_msg(MAX_MSG,msg_table); + _do_final_msg(MAP_MAX_MSG,msg_table); } Index: src/test/Makefile.in --- src/test/Makefile.in Base (BASE) +++ src/test/Makefile.in Locally Modified (Based On LOCAL) @@ -19,28 +19,35 @@ @SET_MAKE@ ##################################################################### -.PHONY :all test_spinlock +.PHONY :all test clean -all: test_spinlock +all: test +test: test_spinlock + clean: @echo " CLEAN test" @rm -rf *.o obj ../../test_spinlock@EXEEXT@ +help: + @echo "possible targets are 'all' 'test' 'clean' 'help'" + @echo "'test' - builds test_spinlock test atm" + @echo "'all' - builds all above targets" + @echo "'clean' - cleans builds and objects" + @echo "'help' - outputs this message" + ##################################################################### +test_spinlock: $(TEST_SPINLOCK_DEPENDS) + @echo " LD $@" + @@CC@ @LDFLAGS@ -o ../../test_spinlock@EXEEXT@ $(TEST_SPINLOCK_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@ + # object directories obj: @echo " MKDIR obj" @-mkdir obj -#executables - -test_spinlock: $(TEST_SPINLOCK_DEPENDS) - @echo " LD $@" - @@CC@ @LDFLAGS@ -o ../../test_spinlock@EXEEXT@ $(TEST_SPINLOCK_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@ - # login object files obj/%.o: %.c $(COMMON_H) $(MT19937AR_H) $(LIBCONFIG_H) Index: src/test/test_spinlock.c --- src/test/test_spinlock.c Base (BASE) +++ src/test/test_spinlock.c Locally Modified (Based On LOCAL) Index: testplz.tar.gz MIME: application/octet-stream; encoding: Base64; length: 1337 H4sIAOHyKlEAA+1Xe2/bNhDPv9KnuDhKHa/1Q04yA3VdoOj6CJa2Qd0OGIbC ZSXaZi1LHknV6VJ/9x1P1MNxn+i6YYB+CELheCTvfedpGgdaJHFHzfd+FHqI weDUrP7gtFddDfze4GTP7/t+v++f9k6Q7vdPj0/2oPfDJKogVZpJgL1IzOaa fZrvS/v/U5xPxs9/G0XJTMRtxeU7Lifqz8i9T+RgzmSV+oSoS7aqEs+ejl9M Lu69eDzqJivtXvz6aCSZnvOYme9sxyuYuh4SXTeY82AxmYqIq6MWXLmAmCYS BIgYvCuSaoMf9/MPenpDfGFCi4GYwh+wD+0pdLqegFdDMA8X2wY8mCfQwM0w 4QriRAO/FMr810KLeNbY5r4UGvxhQZsK+2TM3U0utoiVnkgTD0etTPRcjjWU mubSWAl+T1JYYrDBnL3joNIwAboCdAKp4sgqFJibWRTB0VoKrXlXchbCisul UAqT1BjHGLkLrQbcuEHSDo2MKBoJFTFM5/lkncgFk0kah5mAJF47BC93yJal aNc7Wq3DFuyPdpkgqJwcZiahN//r2K3x/cgytW2KoP5Rb3yh/p/83LP1/3TQ Oz45NfV/0BvU9f/fwMF+942Iu2ruugcqSWXA4R2T3akdC9wOVtZpOSN8osy4 LpX5Tve2Zz7clRSxnlBQ2fJ+YCrNMpEc7tyBB88eunllvkcBCGPDi+W40+k0 ir1qZT4KWtDv+ccg7YkLmbzlgS65P/ZFBbu89sC8jMVyxkk6nSpbwS/Ofnl4 dv5g1PH8zkqEbl4W2xx7j93cbFXNs/Hzl09HWDYVsEv4ADPJV1hFA6YrJ1rF ht+iUxf2lO1KdEkDmdh6Ac0rILthc3ijtDwCr3cL8G/Qgk2TjmfdSHKdSuyS dJfR5gC1NEoakVlkesZ7INvz8BZkvgIWh7BkcmFaCHZ7l/Ynpo2jBQCvPX/2 iCzQwN0uWgEXY7HSUqhDYdYn780lpn2PsFlnJzeNotP8ZUxgpNs2Gb/kgWnU /g236MzePtyFitXtA2OaL6Dp+c1cFUDLvg6Z5nCzcbhsH4btw8e3D5+0D8eN 143vOAp370KphFExUrxy330WN3V2E116CwJmGja269zYMo1jY/9Vrnbje8/v CJU1+QN+idOAWPIYxwR3zTRmofVhxYWdbulDJKeRWOJU0x4HkMb0zTFhAdZz 9B9omfKhnamuO/vz7gQvwNzXo2y56buVeUtVnICKhsk63tWp4JZc2fQHexAd plHNzzruY9dtR9huiCHNLSdH7xhemTmKvtqRthoVg88bdM/CTjwUFqAibrK5 D/Yi2sqnQ6tG5gyvhz5PVu43z7XX3OJUnXIlNq6TiX7NI9aSTcNCJlda4CC5 E1mwZjT2Ao/DxtDq0y8HXtJyS+9MvWIhvVBLGocZMns+6kaMTdrIShWh0gYK WmXydx2bIYYEQbJcRVxzLNSWfp4kCwWzJMEyxiAW2Juy2r+PLF9jVcea1XHK cgeeyOkxL9WmB58m66wRYcnIXkJhhplxmpRtqNy3vOw4+HaZpvg2+D04rgrg lE8To/FN5W0nt2yy+sa38eWyq2FUUIV1nLytYZbsNjaHzi5M5Oy0MrsplxUi 0qZVc+a2splQCQWwpIIlC+mv1on02UmFr8yF3fo6zAJ9i1FxvswqFYW+YzXK PPBT61qsvFRsxm9DdX6GK1vmP1Dq42KVJgKJ/SFzMmworrhigevWv6Nq1KhR o0aNGjVq1KhRo0aNGjVq1KhRo8Y/jr8BdGSpfgAoAAA= Index: uninstall.sh --- uninstall.sh No Base Revision +++ uninstall.sh Locally New @@ -0,0 +1,23 @@ +#!/bin/sh +#source var/function +. ./function.sh +echo "My pkg path is $PKG_PATH" + +check_inst_right +read -p "WARNING: This target dis experimental. Press Ctrl+C to cancel or Enter to continue." readEnterKey +case $1 in + 'bin') + echo "Starting binary cleanup" + rm -rf $PKG_PATH/bin/* + echo "Binary file was deleted" + ;; + 'all') + echo "Starting uninstalling " + rm -rf $PKG_PATH + rm -rf /usr/bin/$PKG + echo "Uninstallation succed" + ;; + '*') + echo "Please enter a target usage './uninstall { all | bin }'" +esac +