-
Notifications
You must be signed in to change notification settings - Fork 0
/
ns.sh
34 lines (22 loc) · 1.03 KB
/
ns.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# This script has been written by Naman Garg
# Naman Garg <[email protected]>
# This script installs the Network Animator and Network Simulator in Arch Linux and Arch Linux based distros, from AUR
# https://aur.archlinux.org/packages/nam
# https://aur.archlinux.org/packages/ns
# This Script requires installation of paru, the AUR helper, and sed along with pacman
# Also, please don't try the script standalone, always download sample.tcl in same folder, so that script can test the installation as well
#!/bin/bash
sudo pacman -Syu --noconfirm
paru -S nam ns --noconfirm
echo "Done installation, now fixing encoding issue in tk.tcl and ttk.tcl"
sudo sed -i 's/-encoding utf-8/ /g' /usr/lib/tk8.6/tk.tcl
sudo sed -i 's/-encoding utf-8/ /g' /usr/lib/tk8.6/ttk/ttk.tcl
if [ -f "sample.tcl" ];
then
echo "Testing The Installation."
ns sample.tcl
else
# is it is not exist then it will be printed
echo "Sorry, can not test installation, because sample.tcl file not found"
echo "You can download it https://github.com/namanlp/ns-2-install"
fi