Skip to content

Commit 193cc8c

Browse files
committed
advertise stdin import
1 parent 565206c commit 193cc8c

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

lib/include/settings.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,26 @@ function create_settings() {
8989
then
9090
return
9191
fi
92+
else
93+
read -p "Do you want to import a previously exported archive from stdin? [y/N]" -n 1 -r
94+
echo ""
95+
if [[ $REPLY =~ ^[Yy]$ ]]
96+
then
97+
mkdir -p lib/plugins
98+
if [ ! -d lib/plugins/server-plugin-export ]
99+
then
100+
git clone https://github.com/DDNetPP/server-plugin-export lib/plugins/server-plugin-export
101+
else
102+
pushd lib/plugins/server-plugin-export
103+
git_save_pull
104+
popd
105+
fi
106+
./lib/plugins/server-plugin-export/bin/archive_cli import --stdin
107+
fi
108+
if [ -f $current_settings_file ];
109+
then
110+
return
111+
fi
92112
fi
93113

94114
read -p "Do you want to create one? [y/N]" -n 1 -r

0 commit comments

Comments
 (0)